Граф коммитов

19 Коммитов

Автор SHA1 Сообщение Дата
Daniel Dunbar 53e8484581 Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm:🆑:init(true) arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89315 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-19 04:55:23 +00:00
Chris Lattner 7909fee36c add rdar # I accidentally lost.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83942 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 04:57:27 +00:00
Chris Lattner 9079cd3106 merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83941 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 04:56:49 +00:00
Chris Lattner bc8d42c6f1 make the diagnostic in the 'unused result' warning more precise
about the reason, rdar://7186119.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83940 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13 04:53:48 +00:00
Anders Carlsson 3af708ff19 More warnings for unused expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77763 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-01 01:39:59 +00:00
Anders Carlsson 754431107b Diagnose unused expression results for all statements, just not compound statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77631 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 22:39:03 +00:00
Chris Lattner fb84664349 fix PR4633: cast to void should silence the 'unused expression' warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77344 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 18:25:28 +00:00
Daniel Dunbar 48d1ef782c Driver: Manually translate a number of -f with no- variants options to
clang.
 - We will eventually want some more driver infrastructre for this
   probably.

 - For now, the clang-cc interface stays relatively the same, but we
   don't accept multiple instances anymore, or the [no-] variants
   directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68550 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 21:16:11 +00:00
Daniel Dunbar d7d5f0223b 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
2009-03-24 02:24:46 +00:00
Chris Lattner 5bef8ddabf add support for -fno-math-errno, and validate that it affects sema properly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 00:35:09 +00:00
Chris Lattner 7d84c76648 sema no longer explodes, yay!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-17 00:32:04 +00:00
Eli Friedman 4be1f47de2 Make the unused expression warning a bit less aggressive (found in PHP
code).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51276 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-19 21:24:43 +00:00
Chris Lattner 3b427b3ba5 rename -parse-ast-print to -ast-print
rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42852 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-11 00:18:28 +00:00
Ted Kremenek 9f3d942e99 Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".

Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.

Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42365 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-26 20:14:22 +00:00
Chris Lattner 98414c1b7d Fix a bug/missing-feature Ted noticed: the 'unused' warning should not
warn about the last stmt in a stmtexpr, f.e. there should be no warning for:

int maxval_stmt_expr(int x, int y) {
  return ({int _a = x, _b = y; _a > _b ? _a : _b; });
}



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41655 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-31 21:49:55 +00:00
Steve Naroff 77878cc5aa Add Type::getAsBuiltinType() and Type::builtinTypesAreCompatible().
Modified Type::typesAreCompatible() to use the above.

This fixes the following bug submitted by Keith Bauer (thanks!).

int equal(char *a, const char *b)
{
    return a == b;
}

Also tweaked Sema::CheckCompareOperands() to ignore the qualifiers when
comparing two pointer types (though it doesn't relate directly to this bug).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-27 04:08:11 +00:00
Chris Lattner 6e844adbe9 Fix a bug reported by Keith Bauer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41452 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-26 17:32:59 +00:00
Chris Lattner 2b8bac52b8 we now correctly emit:
unused-expr.c:8:6: warning: comparison of distinct pointer types ('int volatile *' and 'int *')
  VP == P;
  ~~ ^  ~




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41210 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-21 01:19:46 +00:00
Reid Spencer 5f016e2cb5 Stage two of getting CFE top correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-11 17:01:13 +00:00