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())
         return;
----------------
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.)


https://reviews.llvm.org/D35817



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to