summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Enforce access control for conversion operators used in contextualJohn McCall2011-09-213-8/+8
| | | | | | conversions (rather than just call-arguments). llvm-svn: 140244
* ANSI C requires that a call to an unprototyped function type succeedJohn McCall2011-09-213-2/+82
| | | | | | | | | | | | | | | | | if the definition has a non-variadic prototype with compatible parameters. Therefore, the default rule for such calls must be to use a non-variadic convention. Achieve this by casting the callee to the function type with which it is required to be compatible, unless the target specifically opts out and insists that unprototyped calls should use the variadic rules. The only case of that I'm aware of is the x86-64 convention, which passes arguments the same way in both cases but also sets a small amount of extra information; here we seek to maintain compatibility with GCC, which does set this when calling an unprototyped function. Addresses PR10810 and PR10713. llvm-svn: 140241
* [microsoft] Move missing typename warning from -fms-extensions to ↵Francois Pichet2011-09-211-2/+2
| | | | | | -fms-compatibility. Also allow the missing typename warning at function scope. llvm-svn: 140240
* Fix MSVC9 build by providing a full comparator object to lower_bound.Benjamin Kramer2011-09-211-2/+8
| | | | llvm-svn: 140238
* Change:Richard Trieu2011-09-211-1/+1
| | | | | | | | | | | | assert(!"error message"); To: assert(0 && "error message"); which is more consistant across the code base. llvm-svn: 140232
* Change "ivar" to true for a boolean function argument. Since string ↵Richard Trieu2011-09-211-2/+3
| | | | | | literals are cast to true, this should no effect on behavior. llvm-svn: 140231
* Add case labels for Mips64 architectures.Akira Hatanaka2011-09-211-0/+2
| | | | llvm-svn: 140226
* [analyzer] Fix a bug where PathDiagnosticLocation did not generate a valid ↵Anna Zaks2011-09-211-6/+9
| | | | | | | | range and add asserts to check validity of locations early on. Ignore invalid ranges in PathDiagnosticPiece (they could be added by checker writers). Addresses radar://10124836 and radar://radar10102244. llvm-svn: 140218
* [ARC] Allow forming 'id*' in an unevaluated context. Fixes rdar://10148540.Argyrios Kyrtzidis2011-09-201-0/+5
| | | | llvm-svn: 140212
* [PCH] Don't store the source range for each preprocessed entity sinceArgyrios Kyrtzidis2011-09-202-27/+15
| | | | | | we already have the range in the PPEntityOffsets array. llvm-svn: 140209
* [PCH] Merge ASTReader::LoadPreprocessedEntity with ReadPreprocessedEntityArgyrios Kyrtzidis2011-09-202-97/+94
| | | | | | and don't store the ID for each preprocessed entity. llvm-svn: 140208
* [libclang] When pointing at a macro expansion inside a macro argument,Argyrios Kyrtzidis2011-09-201-3/+3
| | | | | | return a cursor for the inner macro. llvm-svn: 140207
* [analyzer] Refactor PathDiagnosticLocation: Remove SourceRange member from ↵Anna Zaks2011-09-201-8/+5
| | | | | | PathDiagnosticLocation - FullSourceLoc Loc and PathDiagnosticRange Range are sufficient. llvm-svn: 140206
* [analyzer] Remove dead code. (This code is trying to implement the idea that ↵Anna Zaks2011-09-201-37/+0
| | | | | | PathDiagnosticClient could implement DiagnosticClient and has been dead for a while). llvm-svn: 140198
* In SourceManager::translateLineCol, handle the case where we are pointingArgyrios Kyrtzidis2011-09-201-4/+9
| | | | | | directly at the end of the source file. llvm-svn: 140192
* The location of the name in MacroDefinition is the beginning of its range,Argyrios Kyrtzidis2011-09-203-5/+1
| | | | | | don't store an extra location for it. llvm-svn: 140190
* Move Microsoft access specifier bug emulation from -fms-extensions to ↵Francois Pichet2011-09-201-1/+1
| | | | | | -fm-compatibility. llvm-svn: 140189
* For i386 kext fallback to llvm-gcc, search paths for several Darwin versions.Bob Wilson2011-09-202-5/+14
| | | | | | | | | This replaces the hack to read UNAME_RELEASE from the environment when identifying the OS version on Darwin, and it's more flexible. It's also horribly ugly, but at least this consolidates the ugliness to touch less of the code so that it will be easier to rip out later. llvm-svn: 140187
* [analyzer] Refactor PathDiagnosticLocation: Make ↵Anna Zaks2011-09-2015-77/+166
| | | | | | | | PathDiagnosticLocation(SourceLocation...) private. Most of the effort here goes to making BugReport refer to a PathDiagnosticLocation instead of FullSourceLocation. (Another step closer to the goal of having Diagnostics which can recover from invalid SourceLocations.) llvm-svn: 140182
* [analyzer] Refactor PathDiagnosticLocation: Use the pre-computed Range and ↵Anna Zaks2011-09-201-16/+3
| | | | | | Location for profile. llvm-svn: 140180
* [driver] Default to arm mode when using the integrated assembler.Chad Rosier2011-09-204-11/+21
| | | | | | rdar://10125227 llvm-svn: 140179
* Fix a problem in digraph handling where "[:" might be treated as "<::" andRichard Trieu2011-09-201-1/+1
| | | | | | | erronously trigger the digraph correction fix-it. Include a new test to catch this in the future. llvm-svn: 140175
* Define Mips64 TargetInfo classes.Akira Hatanaka2011-09-201-0/+144
| | | | llvm-svn: 140174
* Clean up TargetInfo class hierarchy. Define a base class from which TargetInfosAkira Hatanaka2011-09-201-126/+122
| | | | | | of Mips32 big and little endian derive. llvm-svn: 140170
* Create a MipsTargetCodeGenInfo object for mips64/mips64el. The size of theAkira Hatanaka2011-09-201-0/+4
| | | | | | UnwindException structure is 32 for mips64. llvm-svn: 140165
* [analyzer] Refactor PathDiagnosticLocation: Use PointerUnion of ↵Anna Zaks2011-09-201-9/+16
| | | | | | LocationContext and AnalysisContext to support creation of PathDiagnosticLocations for checkers which no context sensitivity. llvm-svn: 140162
* Add a parameter to MipsTargetCodeGenInfo's constructor.Akira Hatanaka2011-09-201-4/+5
| | | | llvm-svn: 140161
* Introduce an egregious hack for modules to cope with headers that comeDouglas Gregor2011-09-201-0/+29
| | | | | | | | from unfriendly (== not at all modularized) directories. This is temporary, and it only affects module construction until I'll figured out how to deal with system headers. llvm-svn: 140159
* Remove __WCHAR_UNSIGNED__ and anything that used it.Eric Christopher2011-09-201-3/+0
| | | | llvm-svn: 140155
* Test commitDeLesley Hutchins2011-09-201-1/+1
| | | | llvm-svn: 140149
* [analyzer] Refactor PathDiagnosticLocation: Lazily query LocationContext for ↵Anna Zaks2011-09-201-22/+13
| | | | | | a ParentMap as needed. llvm-svn: 140147
* [analyzer] Remove LocationContext and a dependency from PathDiagnosticLoaction.Anna Zaks2011-09-202-4/+4
| | | | llvm-svn: 140146
* Clarify PNaCl target characteristics: set LongDoubleWidth, PtrDiffType, ↵Ivan Krasin2011-09-201-7/+5
| | | | | | | | | IntPtrType, change __builtin_va_list to from a structure to int[4] (same alignment and size, but with a simpler representation). Patch by David Meyer! llvm-svn: 140144
* Remove redundant break statements, and replace asserts with llvm_unreachablePeter Collingbourne2011-09-202-9/+8
| | | | | | Per John's review comments for r140068. llvm-svn: 140142
* Fix a pretty nasty bug in noreturn destructors that cascaded into lotsChandler Carruth2011-09-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | of false positive warnings that depend on noreturn destructors pruning the CFGs, but only in C++0x mode! This was really surprising as the debugger quickly reveals that the attributes are parsed correctly (and using the same code) in both modes. The warning fires in the same way in both modes. But between parsing and building the destructor declaration with the noreturn attribute and the warning, it magically disappears. The key? The 'noexcept' appears! When we were rebuilding the destructor type with the computed implicit noexcept we completely dropped the old type on the floor. This almost makes sense (as the arguments and return type to a destructor aren't exactly unpredictable), but lost any function type attributes as well. The fix is simple, we build the new type off of the old one rather than starting fresh. Testing this is a bit awkward. I've done it by running the noreturn-sensitive tests in both modes, which previous failed and now passes, but if anyone has ideas about how to more specifically and thoroughly test that the extended info on a destructor is preserved when adding noexcept, I'm all ears. llvm-svn: 140138
* [analyzer] Refactor PathDiagnosticLocation: Pre-compute Range and Location ↵Anna Zaks2011-09-201-15/+25
| | | | | | with gen methods on object creation instead of computing on demand. This would allow to remove dependency on the other members which help with construction and might not even be valid at later stages (to be removed later on). llvm-svn: 140131
* [analyzer] Use more create methods in the PathDiagnostic, cleanup.Anna Zaks2011-09-203-10/+21
| | | | llvm-svn: 140130
* Don't assume that the clause is a GlobalVariable. It could be a constant.Bill Wendling2011-09-201-13/+11
| | | | llvm-svn: 140123
* [analyzer] BugReport has a profile method, so reuse it here.Anna Zaks2011-09-191-5/+2
| | | | llvm-svn: 140100
* [analyzer] Constify a method.Anna Zaks2011-09-191-1/+1
| | | | llvm-svn: 140091
* Add list initialization for complex numbers in C. Essentially, this allows ↵Eli Friedman2011-09-193-6/+91
| | | | | | | | "_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description. <rdar://problem/9397672>. llvm-svn: 140090
* The eh.selector intrinsic isn't used anymore. Replace the check here with aBill Wendling2011-09-191-16/+30
| | | | | | | | | check for the landingpad instruction instead. This check looks at each of the clauses in the landingpad instruction. If it's a catch clause, it compares the name directly with the global. If it's a filter clause, it has to look through each value in the filer to see if any have the prefix. llvm-svn: 140075
* Fix gcc build.Argyrios Kyrtzidis2011-09-191-1/+2
| | | | llvm-svn: 140073
* OpenCL: introduce support for function scope __local variablesPeter Collingbourne2011-09-199-10/+127
| | | | llvm-svn: 140068
* In libclang, when visiting preprocessed entities in a source range, useArgyrios Kyrtzidis2011-09-194-94/+2
| | | | | | | | | | PreprocessingRecord's getPreprocessedEntitiesInRange. Also remove all the stuff that were added in ASTUnit that are unnecessary now that we do a binary search for preprocessed entities and deserialize only what is necessary. llvm-svn: 140063
* Introduce local_begin()/local_end() methods in PreprocessingRecord whichArgyrios Kyrtzidis2011-09-193-16/+4
| | | | | | return iterators for local, non-loaded, preprocessed entities. llvm-svn: 140062
* In CodeGenAction::ExecuteAction() use SourceManager::translateFileLineCol()Argyrios Kyrtzidis2011-09-191-1/+1
| | | | | | instead of getLocation() since we don't care about expanded macro arguments. llvm-svn: 140061
* [libclang] When getting a source location from a file:line:col tripletArgyrios Kyrtzidis2011-09-194-24/+57
| | | | | | | check whether the requested location points inside the precompiled preamble, in which case the returned source location will be a "loaded" one. llvm-svn: 140060
* Break SourceManager::translateFileLineCol into translateLineCol that returns theArgyrios Kyrtzidis2011-09-191-7/+22
| | | | | | source location of line:col of a specific FileID. llvm-svn: 140059
* Introduce PreprocessingRecord::getPreprocessedEntitiesInRange()Argyrios Kyrtzidis2011-09-194-14/+246
| | | | | | | | | | which will do a binary search and return a pair of iterators for preprocessed entities in the given source range. Source ranges of preprocessed entities are stored twice currently in the PCH/Module file but this will be fixed in a subsequent commit. llvm-svn: 140058
OpenPOWER on IntegriCloud