summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Revert r139643 while I look into it; it's breaking selfhost.Eli Friedman2011-09-135-31/+46
| | | | llvm-svn: 139648
* [libclang] Introduce clang_getPresumedLocation which works like ↵Argyrios Kyrtzidis2011-09-134-0/+73
| | | | | | | | | | clang_getExpansionLocation but takes into account #line directives coming from preprocessed files. Patch by Vinay Sajip! llvm-svn: 139647
* [PCH] Fix a regression that r139441 introduced (decls were getting passedArgyrios Kyrtzidis2011-09-134-15/+29
| | | | | | | | | | | | | | | | | to the consumer without being fully deserialized). The regression was on compiling boost.python and it was too difficult to get a reduced test case unfortunately. Also modify the logic of how objc methods are getting passed to the consumer; codegen depended on receiving objc methods before the implementation decl. Since the interesting objc methods are ones with a body and such methods only exist inside an ObjCImplDecl, deserialize and pass to consumer all the methods of ObCImplDecl when we see one. Fixes http://llvm.org/PR10922 & rdar://10117105. llvm-svn: 139644
* Make clang use Acquire loads and Release stores where necessary.Eli Friedman2011-09-135-46/+31
| | | | llvm-svn: 139643
* Turn off the generation of unaligned atomic load/store; I'm going to ↵Eli Friedman2011-09-132-3/+7
| | | | | | explicitly error out on such cases in the backend, at least for the moment. llvm-svn: 139640
* When building a module on-demand, clear out the "non-modular" languageDouglas Gregor2011-09-137-10/+37
| | | | | | and preprocessor options (such as macro definitions) first. llvm-svn: 139638
* [libclang] Correct annotation and taking of cursor for objc class referencesArgyrios Kyrtzidis2011-09-132-1/+27
| | | | | | inside the IBOutletCollection attribute. llvm-svn: 139621
* Rename InterFace -> Interface, no functionality change.Argyrios Kyrtzidis2011-09-132-2/+2
| | | | llvm-svn: 139620
* A strong property of block type has "copy" setter semantics, not "retain".John McCall2011-09-132-1/+23
| | | | | | | | | This is consistent with the behavior of assigning into a __strong l-value, and it's also necessary for ensuring that the ivar doesn't end up a dangling reference. We decided not to change the behavior of "retain" properties, but just to make them warnings/errors when of block type. llvm-svn: 139619
* Add the location of the interface reference to IBOutletCollectionAttr.Argyrios Kyrtzidis2011-09-132-3/+4
| | | | | | Depends on a llvm tablegen commit. llvm-svn: 139618
* Refactoring, mostly to give ObjCPropertyDecls stronger invariants forJohn McCall2011-09-136-150/+142
| | | | | | their semantic attributes and then to take advantage of that. llvm-svn: 139615
* Switch the serialization of LangOptions over to use the .def file. WeDouglas Gregor2011-09-137-491/+142
| | | | | | | should no longer have the serialization of LangOptions out of sync with the structure itself (yay). llvm-svn: 139613
* Thread safety: Initializing var before exhaustive switch statement to deal ↵Caitlin Sadowski2011-09-131-1/+1
| | | | | | with extraneous warning produced by gcc but not clang llvm-svn: 139611
* [libclang]Argyrios Kyrtzidis2011-09-134-42/+19
| | | | | | | | -Allow cursor visitation of an attribute using its source range -Add C++ 'final' and 'override' attributes as cursor kinds -Simplify the logic that marks 'final' and 'override' attributes as tokens. llvm-svn: 139609
* Switch LangOptions over to a .def file that describes header of theDouglas Gregor2011-09-1324-302/+269
| | | | | | | | | | language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. llvm-svn: 139605
* [driver] Add follow up comment for r139551 to ensure the unused option is not Chad Rosier2011-09-131-0/+2
| | | | | | | removed in the future. rdar://10110352 and PR10908 llvm-svn: 139602
* Keep the source range of attributes. Depends on a llvm tablegen commit.Argyrios Kyrtzidis2011-09-136-122/+121
| | | | llvm-svn: 139600
* Record the full source range of an attribute.Argyrios Kyrtzidis2011-09-134-39/+42
| | | | llvm-svn: 139599
* Add a struct-size check for modules when dealing with module-private fieldsDouglas Gregor2011-09-131-1/+9
| | | | llvm-svn: 139597
* In Microsoft mode, downgrade "goto into protected scope" from error to ↵Francois Pichet2011-09-133-19/+97
| | | | | | | | warning if we are jumping over a variable initialization via a goto. This fixes a few errors when parsing MFC code with clang. llvm-svn: 139595
* Switch -Wreturn-type to completely rely on the CFG model of no-return.Chandler Carruth2011-09-131-47/+18
| | | | | | | This deletes a bunch of crufty code, and allows more logic sharing between the analyzer and the warnings. llvm-svn: 139594
* Add a bit to the CFGBlock to track when it contains a no-returnChandler Carruth2011-09-132-1/+16
| | | | | | | CFGElement. This will allow greatly simplifying the logic in -Wreturn-type. llvm-svn: 139593
* Consolidate the logic for building a no-return CFG block into a singleChandler Carruth2011-09-131-23/+21
| | | | | | | location with a single comment rather than scattering it in three places. llvm-svn: 139592
* Don't use native atomics on ivars whose size is not a power of two,John McCall2011-09-133-0/+43
| | | | | | | | even on architectures that support unaligned access (which is the only way this is otherwise legal, given that ivars apparently do not honor alignment attributes). llvm-svn: 139590
* This test seems pretty low-value.John McCall2011-09-131-50/+0
| | | | llvm-svn: 139589
* Enhance the CFG construction to detect no-return destructors forChandler Carruth2011-09-134-29/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | temporary objects and local variables. When detected, these split the block, marking the new one as having only the exit block as a successor. This prevents a large number of false positives in warnings sensitive to no-return constructs such as -Wreturn-type, and fixes the remainder of PR10063 along with several variations of this bug that had not been reported. The test cases are extended across the board to cover these patterns. This also checks in a stress test for these types of CFGs. The stress test declares some 32k variables, a mixture of no-return and normal destructors. Previously, this resulted in roughly 2500 CFG blocks, but didn't model any of the no-return destructors. With this patch, it results in over 33k blocks, many of them now unreachable. The nice thing about how the analyzer is set up? This causes *no* regression in performance of building the CFG. It actually in some cases makes it faster, as best I can benchmark. The analysis for -Wreturn-type (and any other that cares about no-return code paths) is technically slower now as it has to look at many more candidate blocks, but it computes the correct answer. I have more test cases to follow, I think they all work now. Also I have further work that should dramatically simplify analyses in the presence of no-return. llvm-svn: 139586
* Handle reference properties correctly in the trivial-getter check.John McCall2011-09-132-17/+43
| | | | llvm-svn: 139585
* Always emit bitfield properties using expression behavior, even if they'reJohn McCall2011-09-132-0/+16
| | | | | | atomic. This is probably something we should warn about. llvm-svn: 139584
* Unify the decision of how to emit property getters and setters into aJohn McCall2011-09-133-209/+357
| | | | | | | | single code path. Use atomic loads and stores where necessary. Load and store anything of the appropriate size and alignment with primitive operations instead of going through the call. llvm-svn: 139580
* When compiling a module on-demand, re-use the diagnostics clientDouglas Gregor2011-09-136-23/+48
| | | | | | | | already provided. This required a little bit of clean-up in the way that VerifyDiagnosticsClient managed ownership of its underlying "primary" client, because now it will no longer always take ownership. llvm-svn: 139570
* When an import statement fails to find a module in the module cache,Douglas Gregor2011-09-128-6/+146
| | | | | | | | | but there is a corresponding umbrella header in a framework, build the module on-the-fly so it can be immediately loaded at the import statement. This is very much proof-of-concept code, with details to be fleshed out over time. llvm-svn: 139558
* Privatize the setter/getter call generation methods, plus some minorJohn McCall2011-09-122-72/+70
| | | | | | modernization. No functionality change. llvm-svn: 139555
* [driver] Ignore the '--' option, rather then fail. Do so to match gcc's Chad Rosier2011-09-121-0/+1
| | | | | | | behavior. rdar://10110352 and PR10908 llvm-svn: 139551
* [analyzer] CmpRuns can now optionally delete empty reports.Anna Zaks2011-09-121-5/+7
| | | | llvm-svn: 139550
* Thread safety: small formatting changeCaitlin Sadowski2011-09-121-1/+2
| | | | llvm-svn: 139548
* [libclang] For getDeclFromExpr in CIndex.cpp, associate the decl ofArgyrios Kyrtzidis2011-09-128-23/+28
| | | | | | | a DeclRefExpr, MemberExpr, etc. with a CastExpr if it is ImplicitCast, since the implicit cast is the one that is invisible in source code. llvm-svn: 139547
* [analyzer] CmpRuns.cmpScanBuildResults() should be easy to call from other ↵Anna Zaks2011-09-121-18/+32
| | | | | | modules. llvm-svn: 139543
* Rename CmpRuns into CmpRuns.py so that it could be used as a module.Anna Zaks2011-09-121-0/+0
| | | | llvm-svn: 139540
* Introduce a cc1-level option to provide the path to the module cache,Douglas Gregor2011-09-1214-25/+58
| | | | | | | | where the compiler will look for module files. Eliminates the egregious hack where we looked into the header search paths for modules. llvm-svn: 139538
* Kill off an irrelevant FIXMEDouglas Gregor2011-09-121-4/+1
| | | | llvm-svn: 139523
* By popular demand, enumerate all builtin types!Devang Patel2011-09-121-2/+14
| | | | llvm-svn: 139521
* Refactor CheckAdditionOperands() to use early return for pointer addition.Richard Trieu2011-09-121-21/+22
| | | | llvm-svn: 139520
* Diagnose attempt to mark function-local declarations as __module_private__.Douglas Gregor2011-09-123-7/+51
| | | | llvm-svn: 139519
* [analyzer] Simplify the test, use generic/more descriptive names.Anna Zaks2011-09-121-8/+8
| | | | llvm-svn: 139516
* Add an assert so that new builtins do not sneak without proper debug info.Devang Patel2011-09-121-0/+2
| | | | llvm-svn: 139514
* Update test to fix windows buildbot.Devang Patel2011-09-121-1/+4
| | | | llvm-svn: 139513
* [libclang] In ASTUnit::Parse copy the CompilerInvocation object instead ofArgyrios Kyrtzidis2011-09-125-17/+27
| | | | | | | | | | | | 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. llvm-svn: 139512
* [libclang] Make c-index-test check CINDEXTEST_REMAP_AFTER_TRIAL environment ↵Argyrios Kyrtzidis2011-09-121-1/+10
| | | | | | | | | variable, which when set it determines the trial number after which the remapping of files should take effect. llvm-svn: 139511
* Fix two comments from warn to emit error to match the actual diagnostic used.Richard Trieu2011-09-121-2/+2
| | | | llvm-svn: 139510
* [analyzer] Fix a failure encountered while analyzing bind (radar://10105448).Anna Zaks2011-09-122-1/+12
| | | | llvm-svn: 139509
OpenPOWER on IntegriCloud