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

31293 Коммитов

Автор SHA1 Сообщение Дата
Anna Zaks f95a2012ab [analyzer] CmpRuns can now optionally delete empty reports.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139550 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 22:40:36 +00:00
Caitlin Sadowski 7613c73af8 Thread safety: small formatting change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139548 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 22:28:41 +00:00
Argyrios Kyrtzidis c2954616fb [libclang] For getDeclFromExpr in CIndex.cpp, associate the decl of
a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast,
since the implicit cast is the one that is invisible in source code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139547 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 22:17:26 +00:00
Anna Zaks 544055fa46 [analyzer] CmpRuns.cmpScanBuildResults() should be easy to call from other modules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139543 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 21:32:41 +00:00
Anna Zaks 22d70e0ca3 Rename CmpRuns into CmpRuns.py so that it could be used as a module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139540 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 21:07:18 +00:00
Douglas Gregor 9a6da69306 Introduce a cc1-level option to provide the path to the module cache,
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 20:41:59 +00:00
Douglas Gregor 48822fbd08 Kill off an irrelevant FIXME
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139523 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:58:37 +00:00
Devang Patel e7566cf6e1 By popular demand, enumerate all builtin types!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139521 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:50:21 +00:00
Richard Trieu 6eef9fb34c Refactor CheckAdditionOperands() to use early return for pointer addition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139520 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:37:54 +00:00
Douglas Gregor e389585f8a Diagnose attempt to mark function-local declarations as __module_private__.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139519 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:37:38 +00:00
Anna Zaks 773d847fbe [analyzer] Simplify the test, use generic/more descriptive names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139516 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:28:35 +00:00
Devang Patel 3d3aa19232 Add an assert so that new builtins do not sneak without proper debug info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139514 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:24:46 +00:00
Devang Patel 74a292f2bb Update test to fix windows buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139513 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:11:52 +00:00
Argyrios Kyrtzidis 26d43cd3a0 [libclang] In ASTUnit::Parse copy the CompilerInvocation object instead of
modifying directly for the preamble.

This avoids an awful, hard to find, bug where "PreprocessorOpts.DisablePCHValidation = true"
would be persistent for subsequent reparses of the translation unit which would result
in defines, present in command-line but not in the PCH, being ignored.

Fixes rdar://9615399.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139512 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:09:38 +00:00
Argyrios Kyrtzidis 40098e8cd7 [libclang] Make c-index-test check CINDEXTEST_REMAP_AFTER_TRIAL environment variable,
which when set it determines the trial number after which the remapping of files should
take effect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139511 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:09:31 +00:00
Richard Trieu d9f1934bd0 Fix two comments from warn to emit error to match the actual diagnostic used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139510 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:08:02 +00:00
Anna Zaks 7a756463ff [analyzer] Fix a failure encountered while analyzing bind (radar://10105448).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139509 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 18:07:30 +00:00
Anna Zaks a81fffe678 Doxygen comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139508 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 17:57:20 +00:00
Anna Zaks f7afe4abd2 [analyzer] Fix a new failure encountered while building Adium exposed as a result of r138196(radar://10087620). ObjectiveC property of type int has a value of type ObjCPropRef, which is a Loc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139507 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 17:56:08 +00:00
Anna Zaks 0047ed1f73 [analyzer] Test for -analyze-function on ObjectiveC to accompany r139439.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139506 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 17:48:08 +00:00
Devang Patel e8ee3f2cda Fix debug info encodings for char16_t and char32_t.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139502 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 17:11:58 +00:00
Douglas Gregor 591dc84101 Allow __module_private__ on fields
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139499 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 16:11:24 +00:00
Douglas Gregor f3a762a8de Remove the restriction on module-private friends. Since the friend
declaration may be the first declaration, we want the ability to that
declaration to be marked module-private.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139497 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 15:48:15 +00:00
Douglas Gregor eced60c185 Only predefine the __EXCEPTIONS macro if C++ exceptions are turned on.
Only predefine the OBJC_ZEROCOST_EXCEPTIONS macro if Objective-C
exceptions are turned on. Fixes PR10910.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139496 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 15:17:19 +00:00
Hans Wennborg cb4d7c202e Silence ?: precendence warning when parenthesis are present.
Fixes PR10898. The warning should be silent when there are parenthesis
around the condition expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139492 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-12 12:07:30 +00:00
Benjamin Kramer afc5b15022 Silence "end of non-void function" warnings with llvm_unreachable and add an assert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139474 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 21:52:04 +00:00
Fariborz Jahanian 3a448fb539 objc rewriter - more fixes to support compiling the rewritten
test case having instancetype. Fix in rewriter is unrelated to
using of instancetype. Test case uses other feature not yet
supported in the rewriter. There is more work to do, but this
is an ongoing task and not urgent at this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139473 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 17:01:56 +00:00
Chris Lattner a2f4ae8cfa remove pedantic ;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139472 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 16:13:42 +00:00
John McCall bbb253c307 Modernize and comment; no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139470 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 09:30:49 +00:00
John McCall 71c758d3f4 Simplify the generation of Objective-C setters, at least a little.
Use a more portable heuristic for deciding when to emit a single
atomic store;  it's possible that I've lost information here, but
I'm not sure how much of the logic before was intentionally arch-specific
and how much was just not quite consistent.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139468 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 09:17:20 +00:00
John McCall 33e56f3273 Rename the ARC cast kinds to start with "ARC".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139466 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 06:18:15 +00:00
David Blaikie ac5ecf46c5 Correctly referring to the null pointer as 'null' not the macro 'NULL' in the boolean conversion diagnostic message.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139465 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 05:47:59 +00:00
Julien Lerouge 6f2ec515d9 Make this test portable on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139464 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 05:46:15 +00:00
David Blaikie 4f4f349208 Show either a location or a fixit note, not both, for uninitialized variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139463 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 05:35:08 +00:00
John McCall b1f251f30e Missed a %local use; hopefully this clears this test up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139462 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 05:31:57 +00:00
Richard Trieu a81b36d7bc Fix a broken assert in AST/DeclCXX.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139461 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 02:16:48 +00:00
Eli Friedman 42f19be40f clang part of r139458; un-XFAIL testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139460 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 02:03:28 +00:00
Richard Trieu 5c988bd71c Revision 139454 fixed a broken assert in LLVM, which causes
a test failure in CodeGen/palignr.c, which has been marked
XFAIL for the time being.  A bug has been filed at PR10901
for this issue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139457 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 01:56:32 +00:00
John McCall bf379a6571 Make this test not depend on unnecessary details and IR variable names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139455 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 01:37:23 +00:00
John McCall dc05b11c67 When converting a block pointer to an Objective-C pointer type, extend
the lifetime of the block by copying it to the heap, or else we'll get
a dangling reference because the code working with the non-block-typed
object will not know it needs to copy.

There is some danger here, e.g. with assigning a block literal to an
unsafe variable, but, well, it's an unsafe variable.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139451 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 01:16:55 +00:00
Douglas Gregor b3321093f6 Fix a diagnostics crasher with -Wmissing-noreturn in Objective-C
methods, and improve the diagnostic slightly along the way. Fixes
<rdar://problem/10098695>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139446 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:56:20 +00:00
Chandler Carruth 78bf680ddf Fix a -Wreturn-type warning due to this field not explicitly having the
enumeration type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139445 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:51:24 +00:00
Devang Patel 68f76b112c Emit debug info for wchar_t.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139443 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:44:49 +00:00
Douglas Gregor 02a5e875cc Don't crash when we fail to load a module. It's unbecoming of a
well-bred compiler like Clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139442 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:30:18 +00:00
Douglas Gregor 94da1587f7 Clean up our handling of Objective-C definitions in AST files. Rather
than having CodeGen check whether a declaration comes from an AST file
(which it shouldn't know or care about), make sure that the AST writer and
reader pass along "interesting" declarations that CodeGen needs to
know about.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139441 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:22:34 +00:00
Anna Zaks d1fe529b1a [analyzer] -analyze-function for ObjectiveC should check if any of the methods match the name (not only the first one).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139439 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:12:23 +00:00
Douglas Gregor 08e0bc16b3 Kill of the Decl::PCHLevel field entirely. We now only need to know
whether a Decl was deserialized from an AST file (any AST file).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139438 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:09:20 +00:00
Chandler Carruth a1364be341 Extend the Stmt AST to make it easier to look through label, default,
and case statements. Use this to make the logic in the CFG builder more
robust at finding the actual statements within a compound statement,
even when there are many layers of labels obscuring it.

Also extend the test cases for a large chunk of PR10063. Still more work
to do here though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139437 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-10 00:02:34 +00:00
Douglas Gregor 35120c6285 The translation unit is never deserialized
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139436 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 23:34:14 +00:00
Douglas Gregor 530b14ad27 Eliminate all but one caller of Decl::getPCHLevel()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139430 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-09 23:07:59 +00:00