summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* AddThunk should take a const reference.Anders Carlsson2010-03-211-2/+2
| | | | llvm-svn: 99140
* Fix PR6648 by not creating a temporary with the type of aRafael Espindola2010-03-211-4/+0
| | | | | | | | | | | CXXExprWithTemporaries. Not emitting the expression as an aggregate might be the right thing to do, but is orthogonal. Emitting it as an scalar expression will still try to create a temporary for the incomplete type of the CXXExprWithTemporaries and fail. llvm-svn: 99134
* Delete the new visitor if an old one already exists.Ted Kremenek2010-03-211-1/+3
| | | | llvm-svn: 99114
* Don't bother running the analysis for CFG-based warnings if theTed Kremenek2010-03-201-0/+7
| | | | | | declaration is in a system header. llvm-svn: 99087
* Refactor CFG-based warnings in Sema to be run by a worked object called ↵Ted Kremenek2010-03-207-302/+425
| | | | | | | | | | | | | | | AnalysisBasedWarnings. This object controls when the warnings are executed, allowing the client code in Sema to selectively disable warnings as needed. Centralizing the logic for analysis-based warnings allows us to optimize when and how they are run. Along the way, remove the redundant logic for the 'check fall-through' warning for blocks; now the same logic is used for both blocks and functions. llvm-svn: 99085
* Fixed synthesizing properties declared in properties (GNU runtime).David Chisnall2010-03-201-1/+1
| | | | llvm-svn: 99077
* Reapply r99024 (but with the memory issue now fixed).Ted Kremenek2010-03-202-0/+51
| | | | llvm-svn: 99064
* Check if a BugReporterVisitor has already been added to a BugReporterContext.Ted Kremenek2010-03-202-2/+31
| | | | | | This avoids redundant diagnostics. llvm-svn: 99063
* Driver: Fix thinkos that prevented Clang from picking the right deploymentDaniel Dunbar2010-03-201-2/+2
| | | | | | target when both {MACOSX,IPHONEOS}_DEPLOYMENT_TARGET were set. llvm-svn: 99055
* Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in ↵Daniel Dunbar2010-03-202-6/+32
| | | | | | -v style) to a file. llvm-svn: 99054
* Driver: Fix -### to quote shell special characters, following gcc.Daniel Dunbar2010-03-201-4/+15
| | | | llvm-svn: 99053
* Add sse4.2 header and builtin support.Eric Christopher2010-03-202-0/+147
| | | | llvm-svn: 99051
* IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the ↵Daniel Dunbar2010-03-201-25/+51
| | | | | | | | semantics. - This should be conservatively correct, we eventually should have target hooks for platforms that are less strict. llvm-svn: 99050
* Evaluate: Fix a subtle bug in the pointer evaluator in which we would do anDaniel Dunbar2010-03-201-10/+17
| | | | | | | | expression computation in the wrong bit-width, and end up generating a totally bogus array reference (_g0+8589934546). - This showed up on Prolangs/cdecl. llvm-svn: 99042
* Driver: Fix a number of -fapple-kext issues:Daniel Dunbar2010-03-201-5/+13
| | | | | | | | | | | | | - Disable RTTI. - Disable use of __cxa_atexit. - Disable unwind tables. - Enable freestanding mode. Also, honor -fhosted correctly. <rdar://problem/7515383> C++ support: -fapple-kext not honored llvm-svn: 99041
* Revert r99024, "Augment path diagnostics to include displaying when a messageDaniel Dunbar2010-03-202-49/+4
| | | | | | expression", statistical evidence indicates it has some kind of memory error. llvm-svn: 99040
* C++: Add support for -fno-use-cxa-atexit.Daniel Dunbar2010-03-206-21/+112
| | | | | | | | - So much typing, so little gain... Also, rename the __cxx_global_initialization function just to match llvm-gcc. llvm-svn: 99039
* IRgen: Inline GenerateCXXGlobal[VarDecl]InitFunc into sole caller.Daniel Dunbar2010-03-202-38/+15
| | | | llvm-svn: 99038
* Implement -Wshadow for parameter declarations as well.John McCall2010-03-202-19/+37
| | | | llvm-svn: 99037
* Add a newline at the end of the file.Eric Christopher2010-03-201-1/+1
| | | | llvm-svn: 99026
* For legacy compatibility add a varargs.h header.Eric Christopher2010-03-201-0/+26
| | | | llvm-svn: 99025
* Augment path diagnostics to include displaying when a message expressionTed Kremenek2010-03-202-4/+49
| | | | | | is not evaluated because the receiver is nil. llvm-svn: 99024
* Driver: Allow Render{Separate,Joined} option flags on JoinedOrSeparate ↵Daniel Dunbar2010-03-202-7/+8
| | | | | | | | option types. Also, simplify/fix SeparateArg::render with forced join. llvm-svn: 99022
* Migrate typedefs to the top level of xmmintrin.h and remove the sameEric Christopher2010-03-202-5/+1
| | | | | | one from emmintrin.h. llvm-svn: 99020
* Driver: Fix possible crash when targetting an unknown (unsupported) DarwinDaniel Dunbar2010-03-202-0/+8
| | | | | | platform, e.g. ppc. llvm-svn: 99016
* Change CodeGenModule to rely on the Module's symbol table instead ofJohn McCall2010-03-196-172/+156
| | | | | | | | | | | | | shadowing it in the GlobalDeclMap. Eliminates the string-uniquing requirement for mangled names, which should help C++ codegen times a little. Forces us to do string lookups instead of pointer lookups, which might hurt codegen times a little across the board. We'll see how it plays out. Removing the string-uniquing requirement implicitly fixes any bugs like PR6635 which arose from the fact that we had multiple uniquing tables for different kinds of identifiers. llvm-svn: 99012
* Remove the capture, serialization, and deserialization of commentDouglas Gregor2010-03-196-255/+3
| | | | | | | | ranges as part of the ASTContext. This code is not and was never used, but contributes ~250k to the size of the Cocoa.h precompiled header. llvm-svn: 99007
* Robustify PreprocessingRecord slightly, by only creating macroDouglas Gregor2010-03-191-3/+12
| | | | | | | | instantiations when we have the corresponding macro definition and by removing macro definition information from our table when the macro is undefined. llvm-svn: 99004
* Implement serialization and lazy deserialization of the preprocessingDouglas Gregor2010-03-193-8/+278
| | | | | | | | | | | | | | | | | | | | | | | | record (which includes all macro instantiations and definitions). As with all lay deserialization, this introduces a new external source (here, an external preprocessing record source) that loads all of the preprocessed entities prior to iterating over the entities. The preprocessing record is an optional part of the precompiled header that is disabled by default (enabled with -detailed-preprocessing-record). When the preprocessor given to the PCH writer has a preprocessing record, that record is written into the PCH file. When the PCH reader is given a PCH file that contains a preprocessing record, it will be lazily loaded (which, effectively, implicitly adds -detailed-preprocessing-record). This is the first case where we have sections of the precompiled header that are added/removed based on a compilation flag, which is unfortunate. However, this data consumes ~550k in the PCH file for Cocoa.h (out of ~9.9MB), and there is a non-trivial cost to gathering this detailed preprocessing information, so it's too expensive to turn on by default. In the future, we should investigate a better encoding of this information. llvm-svn: 99002
* Make the CIndex API more resilient to being used on invalid code.Ted Kremenek2010-03-191-1/+4
| | | | llvm-svn: 98981
* clang -cc1: Kill off -empty-input only, and replace with -init-only which is anDaniel Dunbar2010-03-193-9/+16
| | | | | | | | actual action. - This is easier to use, and more reliable for timing the thing this was actually meant to be useful for. llvm-svn: 98978
* Promote enum types during -Wsign-compare. Fixes some spurious warnings,John McCall2010-03-191-0/+5
| | | | | | mostly during conditional expressions. llvm-svn: 98975
* Diagnose conversion of 'Class' to/from objective-c Fariborz Jahanian2010-03-191-1/+11
| | | | | | | object pointer types. Fixes radar 7634850. llvm-svn: 98970
* Make the preprocessing record a PPCallbacks subclass itself,Douglas Gregor2010-03-192-39/+27
| | | | | | | | eliminating the extra PopulatePreprocessingRecord object. This will become useful once we start writing the preprocessing record to precompiled headers. llvm-svn: 98966
* Optionally store a PreprocessingRecord in the preprocessor itself, andDouglas Gregor2010-03-195-32/+54
| | | | | | tie its creation to a CC1 flag -detailed-preprocessing-record. llvm-svn: 98963
* Try to improve computation of the main file name for debugDouglas Gregor2010-03-191-7/+10
| | | | | | information, to address recent gdb failures. llvm-svn: 98959
* Pretty-print anonymous types using their kind and presumed location.John McCall2010-03-191-6/+25
| | | | | | Fixes PR6643. Patch by Mike M! llvm-svn: 98946
* Remember the "found declaration" for an overload candidate, which is theJohn McCall2010-03-199-201/+224
| | | | | | | | | | | | | | | | entity (if applicable) which was actually looked up. If a candidate was found via a using declaration, this is the UsingShadowDecl; otherwise, if the candidate is template specialization, this is the template; otherwise, this is the function. The point of this exercise is that "found declarations" are the entities we do access control for, not their underlying declarations. Broadly speaking, this patch fixes access control for using declarations. There is a *lot* of redundant code calling into the overload-resolution APIs; we really ought to clean that up. llvm-svn: 98945
* Fix a longstanding (but previously unknown) bug in the lazyDouglas Gregor2010-03-191-1/+1
| | | | | | | | | | | | | deserialization of precompiled headers, where the deserialization of the source location entry for a buffer (e.g., macro instantiation scratch space) would overwrite a one-element FileID cache in the source manager. When tickled at the wrong time, we would return the wrong decomposed source location and eventually cause c-index-test to crash. Found by dumb luck. It's amazing this hasn't shown up before. llvm-svn: 98940
* When elevating access along an inheritance path, initialize the computedJohn McCall2010-03-182-14/+31
| | | | | | | | | | | | | | | | access to the (elevated) access of the accessed declaration, if applicable, rather than plunking that access onto the end after we've calculated the inheritance access. Also, being a friend of a derived class gives you public access to its members (subject to later modification by further inheritance); it does not simply ignore a single location of restricted inheritance. Also, when computing the best unprivileged path to a subobject, preserve the information that the worst path might be AS_none (forbidden) rather than a minimum of AS_private. llvm-svn: 98899
* For debug information, get the main file name from the source managerDouglas Gregor2010-03-181-2/+7
| | | | | | | rather than from the -main-file-name flag, since the source manager has proper path information. Fixes <rdar://problem/7769538>. llvm-svn: 98898
* Make PredefinedExpr::ComputeName() more robust to incorrectTed Kremenek2010-03-181-1/+6
| | | | | | | code when we are printing the name of an Objective-C method whose class has not been declared. Fixes <rdar://problem/7495713>. llvm-svn: 98874
* Add bounds check in PCHReader. when reading source file entry recordTed Kremenek2010-03-181-0/+5
| | | | llvm-svn: 98873
* Some cleanup, change diagnostic when assigning toFariborz Jahanian2010-03-182-8/+3
| | | | | | a property which is not lvalue. llvm-svn: 98848
* Explicitly link macro instantiations to macro definitions in theDouglas Gregor2010-03-181-3/+5
| | | | | | | | preprocessing record. Use that link with clang_getCursorReferenced() and clang_getCursorDefinition() to match instantiations of a macro to the definition of the macro. llvm-svn: 98842
* Introduce the notion of a "preprocessing record", which keeps track ofDouglas Gregor2010-03-183-3/+53
| | | | | | | | | | | | | | | | | | | | | | | | the macro definitions and macro instantiations that are found during preprocessing. Preprocessing records are *not* generated by default; rather, we provide a PPCallbacks subclass that hooks into the existing callback mechanism to record this activity. The only client of preprocessing records is CIndex, which keeps track of macro definitions and instantations so that they can be exposed via cursors. At present, only token annotation uses these facilities, and only for macro instantiations; both will change in the near future. However, with this change, token annotation properly annotates macro instantiations that do not produce any tokens and instantiations of macros that are later undef'd, improving our consistency. Preprocessing directives that are not macro definitions are still handled by clang_annotateTokens() via re-lexing, so that we don't have to track every preprocessing directive in the preprocessing record. Performance impact of preprocessing records is still TBD, although it is limited to CIndex and therefore out of the path of the main compiler. llvm-svn: 98836
* Replace some SmallVectors with arrays.Benjamin Kramer2010-03-181-21/+13
| | | | llvm-svn: 98833
* from code inspection, we were treating placement news with one argument asJohn McCall2010-03-183-7/+39
| | | | | | | | non-placement news when selecting the corresponding operator delete; this is fixed. Access and ambiguity control for calls to operator new and delete. Also AFAICT llvm-svn: 98818
* Make some typedefs privateKovarththanan Rajaratnam2010-03-181-2/+3
| | | | llvm-svn: 98817
* Rename variable to indicate what it is being used forKovarththanan Rajaratnam2010-03-181-4/+4
| | | | llvm-svn: 98816
OpenPOWER on IntegriCloud