rsmith added inline comments.

Comment at: clang/lib/Sema/SemaChecking.cpp:9372
     if (!isa<ComplexType>(Target)) {
-      if (S.SourceMgr.isInSystemMacro(CC))
+      if (S.SourceMgr.isInSystemMacro(CC) || Target->isBooleanType())
Do we really want to have different semantic rules for code from system macros?

If so, the way we usually do this is with a `DefaultError` `ExtWarn` (an 
off-by-default extension).

Comment at: clang/test/SemaCXX/warn-absolute-value.cpp:452
-  (void)abs(x);
-  // expected-warning@-1 {{using integer absolute value function 'abs' when 
argument is of complex type}}
-  // expected-note@-2 {{use function 'cabsf' instead}}
Do we have test coverage for this diagnostic in C still? (It seems to be 
unreachable in C++ now.)

cfe-commits mailing list

Reply via email to