Commit Graph

2 Commits

Author SHA1 Message Date
Matt Beaumont-Gay b1e71a7d0c Fix -Wunused-comparison for comparisons in arguments to function-like macros.
Previously, -Wunused-comparison ignored comparisons in both macro bodies and
macro arguments, but we would still emit a -Wunused-value warning for either.
Now we correctly emit -Wunused-comparison for expressions in macro arguments.

Also, add isMacroBodyExpansion to SourceManager, to go along with
isMacroArgExpansion.

llvm-svn: 172279
2013-01-12 00:54:16 +00:00
Matt Beaumont-Gay 7a57adab83 Suppress -Wunused-value within macros from system headers.
Along the way, move a helper function from SemaChecking.cpp to a more
accessible home in SourceManager.

llvm-svn: 147692
2012-01-06 22:43:58 +00:00