Skip to content

Commit eadf3e5

Browse files
author
Anthony Tran
committed
Added warning and warning group for sanitizer argument mismatch
1 parent f60cc63 commit eadf3e5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

clang/include/clang/Basic/DiagnosticDriverKinds.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -874,4 +874,9 @@ def warn_drv_openacc_without_cir
874874
: Warning<"OpenACC directives will result in no runtime behavior; use "
875875
"-fclangir to enable runtime effect">,
876876
InGroup<SourceUsesOpenACC>;
877+
878+
def warn_drv_sanitize_trap_mismatch : Warning<
879+
"-fsanitize-trap=%0 has no effect because the matching sanitizer is not enabled; "
880+
"did you mean to pass \"-fsanitize=%0\" as well?">,
881+
InGroup<SanitizeTrapMismatch>;
877882
}

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,3 +1752,6 @@ def ExplicitSpecializationStorageClass : DiagGroup<"explicit-specialization-stor
17521752

17531753
// A warning for options that enable a feature that is not yet complete
17541754
def ExperimentalOption : DiagGroup<"experimental-option">;
1755+
1756+
// Warnings for sanitizer arguments
1757+
def SanitizeTrapMismatch : DiagGroup<"sanitize-trap-mismatch">;

0 commit comments

Comments
 (0)