Commit Graph

6 Commits

Author SHA1 Message Date
Douglas Gregor 49862b8285 Don't emit string-comparison or self-comparison warnings in
unevaluated contexts, because they only matter for code that will
actually be evaluated at runtime.

As part of this, I had to extend PartialDiagnostic to support fix-it
hints.

llvm-svn: 93266
2010-01-12 23:18:54 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Ted Kremenek 9ffbe41a6c Fix <rdar://problem/6703892> by not warning about self-comparisons of enum
constants.

llvm-svn: 67390
2009-03-20 18:35:45 +00:00
Ted Kremenek 5d18ce750a Added to test case for "self-comparison check" uses of relation operators: x < x and x > x
should emit warnings.

llvm-svn: 43451
2007-10-29 17:02:56 +00:00
Ted Kremenek e451eae8d7 For non-floating point types, added check for expressions of the form
"x == x" and "x != x".  We emit a warning for these since they always evaluate
to a constant value and often indicate a logical error.

Added test case for this check.

llvm-svn: 43450
2007-10-29 16:58:49 +00:00