summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* objc - Treat type of 'self' in class methods as root ofFariborz Jahanian2011-09-172-8/+29
| | | | | | class of this method. // rdar://10109725 llvm-svn: 139989
* objc: Don't crash with decl context for property impl.Fariborz Jahanian2011-09-171-1/+1
| | | | | | is missing. // rdar//10127639 llvm-svn: 139988
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-1733-81/+82
| | | | | | | | that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. llvm-svn: 139987
* When we load header file information from the external source (i.e.,Douglas Gregor2011-09-171-8/+28
| | | | | | | | the AST reader), merge that header file information with whatever header file information we already have. Otherwise, we might forget something we already knew (e.g., that the header was #import'd already). llvm-svn: 139979
* As per discussion with Doug Gregor on the IRC channel, introduce a new ↵Francois Pichet2011-09-172-0/+6
| | | | | | | | | | | | compiler switch: -fms-compatility. Microsoft specific tweaking will now fall into 2 categories: - fms-extension: Microsoft specific extensions that should never change the meaning of an otherwise well formed code. Currently map to LangOptions::Microsoft. (To be clearer, I am planning to change the name to LangOptions::MicrosoftExt). - fms-compatibility: Really a MSVC emulation mode. Map to LangOptions::MicrosoftMode. Can change the meaning of an otherwise standard conformant program. llvm-svn: 139978
* Pass -fmodule-cache-path along to -cc1 properlyDouglas Gregor2011-09-171-1/+0
| | | | llvm-svn: 139977
* With modules, we can end up loading a new module after we've seen anDouglas Gregor2011-09-171-7/+69
| | | | | | | | | arbitrary amount of code. This forces us to stage the AST writer more strictly, ensuring that we don't assign a declaration ID to a declaration until after we're certain that no more modules will get loaded. llvm-svn: 139974
* In Microsoft mode, warn if an indirect goto jump over a variable initialization.Francois Pichet2011-09-161-2/+3
| | | | | | Also add a test case for the non Microsoft case because such test didn't exist. llvm-svn: 139971
* Fix massive LiveVariables regression (due to LiveVariables rewrite) by ↵Ted Kremenek2011-09-161-62/+222
| | | | | | | | | | | | | | | | addressing two performance problems: - Speed of "merge()", which merged data flow facts. This was doing a set canonicalization on every insertion, which was super slow. To fix this, we use ImmutableSetRef. - Visit CFGBlocks in reverse postorder. This is a huge speedup, as on some test cases the algorithm would take many iterations to converge. This contains a bunch of copy-paste from UninitializedValues.cpp and ThreadSafety.cpp. The idea was to get something working first, and then refactor the common logic for all three files into a separate analysis/library entry point. llvm-svn: 139968
* Fix search paths for Ubuntu 11.04 x86. Patch by Stepan Dyatkovskiy.Eli Friedman2011-09-161-0/+11
| | | | llvm-svn: 139941
* [analyzer] Refactor: make PathDiagnosticLocation responsible for validation ↵Anna Zaks2011-09-163-48/+87
| | | | | | | | | | of SourceLocations (commit 5 of ?): - Get rid of PathDiagnosticLocation(SourceRange r,..) constructor by providing a bunch of create methods. - The PathDiagnosticLocation(SourceLocation L,..), which is used by crate methods, will eventually become private. - Test difference is in the case when the report starts at the beginning of the function. We used to represent that point as a range of the very first token in the first statement. Now, it's just a single location representing the first character of the first statement. llvm-svn: 139932
* Moves calls of checkArithmeticNull() from CreateBuiltinBinOp() into the ↵Richard Trieu2011-09-161-49/+53
| | | | | | individual Check*Operands() functions. llvm-svn: 139895
* Thread safety: Adding FIXMEs and a couple cleanupsCaitlin Sadowski2011-09-162-30/+13
| | | | llvm-svn: 139894
* Tweak the module auto-import heuristics a bitDouglas Gregor2011-09-161-1/+2
| | | | llvm-svn: 139887
* Remove no longer needed LHSType and RHSType from checkArithmeticNull()Richard Trieu2011-09-151-3/+1
| | | | llvm-svn: 139879
* Change checkArithmeticNull() to use a NonNullType, instead of checking both theRichard Trieu2011-09-151-14/+6
| | | | | | LHSType and RHSType for everything. llvm-svn: 139878
* Tweak *mmintrin.h so that they don't make any bad assumptions about ↵Eli Friedman2011-09-153-30/+75
| | | | | | | | alignment (which probably has little effect in practice, but better to get it right). Make the load in _mm_loadh_pi and _mm_loadl_pi a single LLVM IR instruction to make optimizing easier for CodeGen. rdar://10054986 llvm-svn: 139874
* Add an experimental flag -fauto-module-import that automatically turnsDouglas Gregor2011-09-159-17/+67
| | | | | | | #include or #import direcctives of framework headers into module imports of the corresponding framework module. llvm-svn: 139860
* Finish the lex->LHS and rex->RHS cleanup in Sema.Richard Trieu2011-09-152-49/+47
| | | | llvm-svn: 139856
* Comment what's going on when we compile a moduleDouglas Gregor2011-09-151-0/+8
| | | | llvm-svn: 139837
* reverse patch in r139818 to focus on 'self'Fariborz Jahanian2011-09-151-30/+1
| | | | | | instead of 'Class'. llvm-svn: 139834
* Detect cyclic module dependencies in a manner that is rather moreDouglas Gregor2011-09-151-0/+23
| | | | | | graceful than running out of stack space. llvm-svn: 139833
* [analyzer] Refactor: make PathDiagnosticLocation responsible for validation ↵Anna Zaks2011-09-151-1/+1
| | | | | | | | | of SourceLocations (commit 4 of ?): - The closing brace is always a single location, not a range. - The test case previously had a location key 57:1 followed by a range [57:1 - 57:1]. llvm-svn: 139832
* Eliminate the list of modules from the preprocessor options. This wasDouglas Gregor2011-09-151-24/+0
| | | | | | | used back when we had an -import-module command-line option, but it's no longer used (or useful). llvm-svn: 139829
* Eliminate the unused -create-module cc1-level optionDouglas Gregor2011-09-152-4/+0
| | | | llvm-svn: 139827
* Refactor the load of the exception pointer and the exception selector from theirBill Wendling2011-09-153-14/+24
| | | | | | storage slot into helper functions. llvm-svn: 139826
* [analyzer] Refactor: make PathDiagnosticLocation responsible for validation ↵Anna Zaks2011-09-153-39/+34
| | | | | | | | | of SourceLocations (commit 2 of ?): - Fix a fixme and move the logic of creating a PathDiagnosticLocation corresponding to a ProgramPoint into a PathDiagnosticLocation constructor. - Rename PathDiagnosticLocation::create to differentiate from the added constructor. llvm-svn: 139825
* When we load the first module, make sure that we wire up the ASTConsumer to ↵Douglas Gregor2011-09-152-0/+3
| | | | | | the newly-created ASTReader. This makes sure that CodeGen sees the declarations it is interested in llvm-svn: 139824
* Objective-c: Conversion from type Class to any root class type is allowed Fariborz Jahanian2011-09-151-2/+30
| | | | | | in class methods with no warning. //rdar://10109725 llvm-svn: 139818
* [PCH] Overhaul how preprocessed entities are [de]serialized.Argyrios Kyrtzidis2011-09-155-226/+112
| | | | | | | | | | | | | -Use an array of offsets for all preprocessed entities -Get rid of the separate array of offsets for just macro definitions; for references to macro definitions use an index inside the preprocessed entities array. -Deserialize each preprocessed entity lazily, at first request; not in bulk. Paves the way for binary searching of preprocessed entities that will offer efficiency and will simplify things on the libclang side a lot. llvm-svn: 139809
* Thread safety: cleaning up FIXME for trylocksCaitlin Sadowski2011-09-151-4/+4
| | | | llvm-svn: 139805
* Thread safety: completeing the implementation of shared/exclusive locks ↵Caitlin Sadowski2011-09-151-2/+45
| | | | | | required attributes llvm-svn: 139804
* Thread safety: refactoring various out of scope warnings to use the same ↵Caitlin Sadowski2011-09-152-92/+36
| | | | | | inteface. This eliminates a lot of unnecessary duplicated code. llvm-svn: 139801
* Teach LangOptions::resetNonModularOptions to actually do what it says it doesDouglas Gregor2011-09-151-0/+3
| | | | llvm-svn: 139791
* PTX: Define target optionsJustin Holewinski2011-09-151-0/+89
| | | | llvm-svn: 139789
* Rewrite this loop to use partial destruction; I'm not sure it'sJohn McCall2011-09-152-61/+77
| | | | | | | | possible for that to matter right now, but eventually I think we'll need to unify this better, and then it might. Also, use a more efficient looping structure. llvm-svn: 139788
* Sorry, that assertion actually already exists.John McCall2011-09-151-2/+0
| | | | llvm-svn: 139770
* We don't generate null initializer expressions anymore, andJohn McCall2011-09-151-5/+3
| | | | | | we don't need to. llvm-svn: 139769
* [analyzer] Refactor: make PathDiagnosticLocation responsible for validation ↵Anna Zaks2011-09-155-59/+69
| | | | | | | | | of SourceLocations (commit 2 of ?): - Modify all PathDiagnosticLocation constructors that take Stmt to also requre LocationContext. - Add a constructor which should be used in case there is no valid statement/location (it will grab the location of the enclosing function). llvm-svn: 139763
* Emit debug info for c++0x nullptr.Devang Patel2011-09-141-2/+2
| | | | llvm-svn: 139752
* Make -E work with module importsDouglas Gregor2011-09-141-5/+11
| | | | llvm-svn: 139750
* Don't try to write a macro offset for an identifier that names a ↵Douglas Gregor2011-09-141-17/+13
| | | | | | non-exported macro, for real this time llvm-svn: 139745
* Revert my exported-macro hackery. Something is amissDouglas Gregor2011-09-141-12/+13
| | | | llvm-svn: 139734
* Make sure that we actually keep the key length and data length in sync when ↵Douglas Gregor2011-09-141-14/+12
| | | | | | dealing with non-exported macros llvm-svn: 139731
* Don't try to write a macro offset for an identifier that names a ↵Douglas Gregor2011-09-141-1/+2
| | | | | | non-exported macro llvm-svn: 139728
* Teach the driver to always pass down a module cache path. If none isDouglas Gregor2011-09-141-0/+15
| | | | | | | supplied, use something derived from the system's temporary directory. Depends on LLVM r139725. llvm-svn: 139726
* Thread safety: reverting to use separate warning for requirement to hold any ↵Caitlin Sadowski2011-09-141-4/+9
| | | | | | lock llvm-svn: 139723
* Thread safety: adding additional documentation to the main thread safety ↵Caitlin Sadowski2011-09-141-1/+5
| | | | | | interface, and making the destructor for the thread safety handler pure virtual llvm-svn: 139722
* Thread safety: adding test cases for unparseable lock expressions and ↵Caitlin Sadowski2011-09-141-16/+33
| | | | | | expanding the handling of these expressions llvm-svn: 139720
* Plug an abstraction leak and fix a crasher in DiagnoseInvalidRedeclarationKaelyn Uhrain2011-09-141-2/+7
| | | | llvm-svn: 139718
OpenPOWER on IntegriCloud