summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* ABI: modify CreateCoercedLoad and CreateCoercedStore to not use load or store ofManman Ren2012-11-281-12/+12
| | | | | | | | | | | | | | | the original parameter or return type. Since we do not accurately represent the data fields of a union, we should not directly load or store a union type. As an exmple, if we have i8,i8, i32, i32 as one field type and i32,i32 as another field type, the first field type will be chosen to represent the union. If we load with the union's type, the 3rd byte and the 4th byte will be skipped. rdar://12723368 llvm-svn: 168820
* PR13098: If we're instantiating an overloaded binary operator and we couldRichard Smith2012-11-281-1/+6
| | | | | | | | | determine which member function would be the callee from within the template definition, don't pass that function as a "non-member function" to CreateOverloadedBinOp. Instead, just rely on it to select the member function for itself. llvm-svn: 168818
* Refactor -fsanitize, -f*-sanitizer arguments parsing. Provide a more careful ↵Alexey Samsonov2012-11-282-46/+66
| | | | | | diagnostic for invalid sets of sanitizers llvm-svn: 168794
* [asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), ↵Kostya Serebryany2012-11-281-1/+2
| | | | | | Clang part. llvm-svn: 168782
* Remove obsolete comment missed by r162937Andy Gibbs2012-11-281-4/+0
| | | | llvm-svn: 168778
* Teach Lexer::getSpelling about raw string literals. Specifically, if a rawRichard Smith2012-11-281-42/+67
| | | | | | | | string literal needs cleaning (because it contains line-splicing in the encoding prefix or in the ud-suffix), do not clean the section between the double-quotes -- that's the "raw" bit! llvm-svn: 168776
* Store on the CXXRecordDecl whether the class has, or would have, a copyRichard Smith2012-11-285-248/+160
| | | | | | | constructor/assignment operator with a const-qualified parameter type. The prior method for determining this incorrectly used overload resolution. llvm-svn: 168775
* Remove workaround in RegionStore in r168741 since it is handled more ↵Ted Kremenek2012-11-281-10/+8
| | | | | | generally by r168757. llvm-svn: 168774
* Introduce ASTUnresolvedSet, an UnresolvedSet-like class, whose contents areArgyrios Kyrtzidis2012-11-284-15/+16
| | | | | | | | | | | allocated using the allocator associated with an ASTContext. Use this inside CXXRecordDecl::DefinitionData instead of an UnresolvedSet to avoid a potential memory leak. rdar://12761275 llvm-svn: 168771
* Don't return a pointer to an UnresolvedSetImpl in the CXXRecordDecl interface,Argyrios Kyrtzidis2012-11-287-64/+74
| | | | | | expose only the iterators instead. llvm-svn: 168770
* C++ core issue 1344, PR10618: promote "addition of default argument makes thisRichard Smith2012-11-281-9/+16
| | | | | | | | | | | | a special member" diagnostic from warning to error, and fix the cases where it produced diagnostics with incorrect wording. We don't support this as an extension, and we ban it even in C++98 mode. This breaks too much (for instance, the ABI-specified calling convention for a type can change if it acquires a copy constructor through the addition of a default argument). llvm-svn: 168769
* Fix another false positive due to a CXX temporary object appearing in a C ↵Ted Kremenek2012-11-281-2/+4
| | | | | | | | | | | initializer. The stop-gap here is to just drop such objects when processing the InitListExpr. We still need a better solution. Fixes <rdar://problem/12755044>. llvm-svn: 168757
* objective-C arc: Underline the selector when issuingFariborz Jahanian2012-11-281-1/+2
| | | | | | | arc specific diagnostic on the selector. This is objc-arc part of // rdar://11303469 llvm-svn: 168756
* Provide stop-gap solution to crash reported in PR 14436.Ted Kremenek2012-11-271-8/+10
| | | | | | | | | | | | | This was also covered by <rdar://problem/12753384>. The static analyzer evaluates a CXXConstructExpr within an initializer expression and RegionStore doesn't know how to handle the resulting CXXTempObjectRegion that gets created. We need a better solution than just dropping the value, but we need to better understand how to implement the right semantics here. Thanks to Jordan for his help diagnosing the behavior here. llvm-svn: 168741
* objective-C arc: load of a __weak object happens via call toFariborz Jahanian2012-11-274-13/+42
| | | | | | | | | | | objc_loadWeak. This retains and autorelease the weakly-refereced object. This hidden autorelease sometimes makes __weak variable alive even after the weak reference is erased, because the object is still referenced by an autorelease pool. This patch overcomes this behavior by loading a weak object via call to objc_loadWeakRetained(), followng it by objc_release at appropriate place, thereby removing the hidden autorelease. // rdar://10849570 llvm-svn: 168740
* Move PrettyStackTraceParserEntry to ParseAST.cppNico Weber2012-11-272-26/+35
| | | | | | | r128056 moved PrettyStackTraceParserEntry construction from Parser.h to ParseAST.cpp, so there's no need to keep this class in a header. llvm-svn: 168731
* Allow an ASTConsumer to selectively skip function bodies while parsing. PatchRichard Smith2012-11-271-0/+3
| | | | | | by Olivier Goffart! llvm-svn: 168726
* Simplify checking for whether we should implicitly declare special members andRichard Smith2012-11-272-17/+13
| | | | | | add some assertions. No functionality change. llvm-svn: 168725
* Remove an extra semicolon.Chad Rosier2012-11-271-1/+1
| | | | llvm-svn: 168707
* Remove some dead code. CLANG_IS_PRODUCTION is now just a build flag andRafael Espindola2012-11-273-3/+2
| | | | | | is not used in any #ifdef. llvm-svn: 168703
* Add -fsanitize=integer for reporting suspicious integer behaviors.Will Dietz2012-11-272-23/+53
| | | | | | Introduces new sanitizer "unsigned-integer-overflow". llvm-svn: 168701
* Fix the definition of the vfork() builtin on Haiku. PR14378.Eli Friedman2012-11-273-0/+11
| | | | llvm-svn: 168674
* This patch addresses an incompatibility relative to the 64-bit PowerPCBill Schmidt2012-11-271-0/+3
| | | | | | | | | | | | | | | ELF ABI. Complex values are to be passed in registers as though the real and imaginary parts were passed as separate parameters. Prior to this patch, complex values were passed as byval aggregates. It turns out that specifying getDirect() for all complex types when classifying the argument type results in the desired behavior. The new Clang test case verifies that the correct LLVM IR is generated for caller and callee for each of the underlying types for _Complex. llvm-svn: 168673
* Revert r168411 for now.Rafael Espindola2012-11-271-4/+6
| | | | llvm-svn: 168667
* Frontend: Create a virtual file for named pipe inputs.Daniel Dunbar2012-11-271-1/+5
| | | | | | - This ensures we see the right buffer size for the file. llvm-svn: 168636
* Improve diagnostic on C++11 attribute specifiers that appear at wrong ↵Michael Han2012-11-262-6/+90
| | | | | | | | | | | | | syntactic locations around class specifiers. This change list implemented logic that explicitly detects several combinations of locations where C++11 attribute specifiers might be incorrectly placed within a class specifier. Previously we emit generic diagnostics like "expected identifier" for such cases; now we emit specific diagnostic against the misplaced attributes, this also fixed a bug in old code where attributes appear at legitimate locations were incorrectly rejected. Thanks to Richard Smith for reviewing! llvm-svn: 168626
* Add missing "break". Thanks to Craig for spotting it.Eli Friedman2012-11-261-0/+1
| | | | | | I'm looking at ways to fix the relevant test so it can catch this sort of mistake. llvm-svn: 168618
* [analyzer] Fix a crash reported in PR 14400.Anna Zaks2012-11-262-1/+3
| | | | | | | | The AllocaRegion did not have the superRegion (based on LocationContext) as part of it's hash. As a consequence, the AllocaRegions from different frames were uniqued to be the same region. llvm-svn: 168599
* MSPGCC renamed ISR vectors from vector_<address> to __isr_<number>. This ↵Anton Korobeynikov2012-11-261-2/+2
| | | | | | | | patch makes Clang reflect this scheme. Patch by Job Noorman! llvm-svn: 168598
* Fix PR14413 - incorrect mangling of anonymous namespaces with -cxx-abi microsoftTimur Iskhodzhanov2012-11-261-1/+1
| | | | llvm-svn: 168583
* PR14428: When instantiating a 'new' expression, if we had a non-dependentRichard Smith2012-11-262-22/+19
| | | | | | | | initialization, don't rebuild it. Remove a couple of hacks which were trying to work around this. Fix the special case for one-argument CXXConstructExprs to not apply if the one argument is a default argument. llvm-svn: 168582
* Add r168519 back, but with a fix to also merge the used flag in variables.Rafael Espindola2012-11-252-7/+8
| | | | llvm-svn: 168564
* Revert r168519, "Merge used flags so that we don't have to iterate on ↵NAKAMURA Takumi2012-11-242-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | isUsed. With this change" It brought bunch of (possibly false) warnings. llvm/unittests/VMCore/PassManagerTest.cpp:60:22: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleNDNM::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:86:22: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleNDM2::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:106:21: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char ModuleDNM::ID=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:217:16: warning: variable 'initcount' is not needed and will not be emitted [-Wunneeded-internal-declaration] int LPass::initcount=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:218:16: warning: variable 'fincount' is not needed and will not be emitted [-Wunneeded-internal-declaration] int LPass::fincount=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:259:16: warning: variable 'inited' is not needed and will not be emitted [-Wunneeded-internal-declaration] int BPass::inited=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:260:16: warning: variable 'fin' is not needed and will not be emitted [-Wunneeded-internal-declaration] int BPass::fin=0; ^ llvm/unittests/VMCore/PassManagerTest.cpp:283:24: warning: variable 'ID' is not needed and will not be emitted [-Wunneeded-internal-declaration] char OnTheFlyTest::ID=0; ^ 8 warnings generated. llvm-svn: 168549
* Sema: Provide a valid source location when instantiating templates based on ↵Benjamin Kramer2012-11-231-1/+1
| | | | | | | | a CXXDefaultArgExpr. Fixes PR13758. llvm-svn: 168521
* Merge used flags so that we don't have to iterate on isUsed. With this changeRafael Espindola2012-11-232-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | "clang -cc1 -fsyntax-only" on the preprocessed output of #define M extern int a; #define M2 M M #define M4 M2 M2 #define M8 M4 M4 #define M16 M8 M8 #define M32 M16 M16 #define M64 M32 M32 #define M128 M64 M64 #define M256 M128 M128 #define M512 M256 M256 #define M1024 M512 M512 #define M2048 M1024 M1024 #define M4096 M2048 M2048 #define M8192 M4096 M4096 #define M16384 M8192 M8192 M16384 goes from 2.994s to 1.416s. GCC is at 0.022s, so we still have a long way to go. llvm-svn: 168519
* Remove redundant check.Rafael Espindola2012-11-231-2/+3
| | | | llvm-svn: 168515
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-234-15/+7
| | | | llvm-svn: 168510
* Reapply a subset of r167567 to clean up Darwin-specific code for invoking gcc.Bob Wilson2012-11-233-672/+18
| | | | | | | | | | | Unlike my previous attempt at this, this patch leaves intact the check for whether clang can handle the input file type, and for non-Darwin toolchains it will invoke gcc for things it cannot handle. For Darwin toolchains, the behavior reported in pr14338 still occurs with this patch, but that is a definite improvement from what happens currently, where it just crashes with an assertion failure. llvm-svn: 168505
* Make helpers static/anonymous.Benjamin Kramer2012-11-221-2/+2
| | | | llvm-svn: 168500
* Fix regression in r168477. Use canonical decl when looking for base classRichard Smith2012-11-221-1/+1
| | | | | | specified as a qualified name. llvm-svn: 168479
* Fix CXXRecordDecl::forallBases to not look through bases which are dependentRichard Smith2012-11-223-47/+43
| | | | | | | | and defined within the current instantiation, but which are not part of the current instantiation. Previously, it would look at bases which could be specialized separately from the current template. llvm-svn: 168477
* Fix the '-fuse-init-array' option to actually be an option.Chandler Carruth2012-11-214-6/+13
| | | | | | | | | | | | | | | | | | Previously, this flag to CC1 was never exposed at the clang driver layer, and if you happened to enable it (by being on Android or GCC 4.7 platform), you couldn't *disable* it, because there was no 'no' variant. The whole thing was confusingly implemented. Now, the target-specific flag processing gets the driver arg list, and we use standard hasFlag with a default based on the GCC version and/or Android platform. The user can still pass the 'no-' variant to forcibly disable the flag, or pass the positive variant to clang itself to enable the flag. The test has also been substantially cleaned up and extended to cover these use cases. llvm-svn: 168473
* SemaCXX: an enumeral type can be of character or boolean type in a C++11 ↵Benjamin Kramer2012-11-211-25/+24
| | | | | | | | enum class. Make sure we create a literal of the right type. Fixes PR14386. llvm-svn: 168441
* Test commit: Remove blank line.Joey Gouly2012-11-211-1/+1
| | | | llvm-svn: 168436
* [Sanitizer] force linking with static sanitizer runtimes on Darwin even if ↵Alexey Samsonov2012-11-212-8/+11
| | | | | | they are not found in resource directory. Add test checking sanitizer linker flags on Darwin. llvm-svn: 168428
* Use color for -ast-dump-filter only when it is supportedDmitri Gribenko2012-11-211-3/+6
| | | | | | Patch by Philip Craig. llvm-svn: 168420
* Remove redundant code.Rafael Espindola2012-11-211-6/+4
| | | | llvm-svn: 168411
* Remove redundant code.Rafael Espindola2012-11-211-24/+3
| | | | llvm-svn: 168410
* Update method calls to the new interface re r168354.Bill Wendling2012-11-202-3/+4
| | | | llvm-svn: 168355
* Fix some trailing whitespace (on a blank line) to cycle/test bots.David Blaikie2012-11-191-1/+1
| | | | llvm-svn: 168340
OpenPOWER on IntegriCloud