History log of /external/clang/test/Sema/self-comparison.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
657ca29cff71016e5300825ef539140b34fa535a 16-Sep-2010 Ted Kremenek <kremenek@apple.com> For self-comparison warning, check the source location of both the LHS and RHS to see if they
are expanded from macros (and if so, omit the warning). Previously we were just looking at the
location of the binary expression.

Fixes <rdar://problem/8435950>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c
0737f2e65032a3715a9b10be1400d581bb96bd49 12-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Fix another aspect of PR7047, macro expansions. Previously, this was hacked
around by exempting enums from the check, but this doesn't handle a lot of
cases. A better approach is to directly check if the operator comes from
a macro expansion.

I've removed a reference to the rdar that originally led to the enum
suppression when removing it's overly contrived test case. Let me know if that
number or a more reasilistic test case involving enums is still needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c
5d8e67ed117c2e0a19acaa8d8f7c7dd900011b60 08-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Warn about comparisons between arrays and improve self-comparison
warnings, from Troy Straszheim! Fixes PR6163.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c
03d4a759ca310279ed396418a3d6469dd1f06c3a 13-Jan-2010 Douglas Gregor <doug.gregor@gmail.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c
3573b2c84372d9484296fa658f5276f6c09acb92 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c
ffd408a50adb01ae9c0ad92fb5f0981e1ca72df5 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c
f042dc6c65345b02bc7bbda6a57a4554c1135676 20-Mar-2009 Ted Kremenek <kremenek@apple.com> Fix <rdar://problem/6703892> by not warning about self-comparisons of enum
constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c
4926e10989b2877ed9558c0cff01816d18a6b9be 29-Oct-2007 Ted Kremenek <kremenek@apple.com> Added to test case for "self-comparison check" uses of relation operators: x < x and x > x
should emit warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c
cf8b77d47f0c9dde19da4de74e42f095a7cc2723 29-Oct-2007 Ted Kremenek <kremenek@apple.com> 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/self-comparison.c