summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [analyzer] SATestBuild.py: allow make builds to disable parallelizationJordan Rose2012-11-261-1/+2
| | | | | | | | Before, SATestBuild unilaterally added '-j<n>' to every project built with 'make'. Now, we check and see if there's a -j option already specified, which allows a project to explicitly be marked '-j1'. llvm-svn: 168603
* [analyzer] Fix a crash reported in PR 14400.Anna Zaks2012-11-263-1/+8
| | | | | | | | 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-262-3/+10
| | | | llvm-svn: 168583
* PR14428: When instantiating a 'new' expression, if we had a non-dependentRichard Smith2012-11-263-25/+23
| | | | | | | | 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
* Add a basic testcase for the "variable is not needed" warning and one thatRafael Espindola2012-11-251-0/+27
| | | | | | regressed in r168519. llvm-svn: 168563
* Fix test case for linking with sanitizer opts added in r168428.Alexey Samsonov2012-11-251-3/+2
| | | | llvm-svn: 168562
* 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
* Make err_module_expected_semi consistent with all the other expected_semi diags.Nico Weber2012-11-241-1/+1
| | | | llvm-svn: 168535
* Sema: Provide a valid source location when instantiating templates based on ↵Benjamin Kramer2012-11-233-1/+21
| | | | | | | | 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
* Check that we don't warn on this testcase. This is basically a test thatRafael Espindola2012-11-231-1/+1
| | | | | | | Decl::isUsed checks the attribute. If the function had a body just the check is DeclMustBeEmitted would be sufficient. llvm-svn: 168514
* PR14306: Move -fbounds-checking to -fsanitize=bounds.Joey Gouly2012-11-2311-30/+48
| | | | 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-222-3/+6
| | | | llvm-svn: 168500
* Fix regression in r168477. Use canonical decl when looking for base classRichard Smith2012-11-222-1/+10
| | | | | | specified as a qualified name. llvm-svn: 168479
* Fix CXXRecordDecl::forallBases to not look through bases which are dependentRichard Smith2012-11-226-49/+116
| | | | | | | | 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
* Test that we correctly deal with multiple copy constructors when detectingRichard Smith2012-11-221-2/+13
| | | | | | non-trivial special members for varargs calls. llvm-svn: 168476
* Fix the '-fuse-init-array' option to actually be an option.Chandler Carruth2012-11-218-26/+53
| | | | | | | | | | | | | | | | | | 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-212-26/+91
| | | | | | | | 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
* Try to fix test from r168428 on mingw botAlexey Samsonov2012-11-211-4/+4
| | | | llvm-svn: 168431
* clang/test/Driver/x86_64-nacl-defines.cpp: Specify filename generated.NAKAMURA Takumi2012-11-211-1/+1
| | | | | FIXME: It could be /dev/null. llvm-svn: 168429
* [Sanitizer] force linking with static sanitizer runtimes on Darwin even if ↵Alexey Samsonov2012-11-213-8/+51
| | | | | | 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-212-4/+8
| | | | | | 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
* Don't walk a linked list twice in the same function. On my machine this takesRafael Espindola2012-11-201-2/+2
| | | | | | | | "clang -cc1" on a file with 10k repetitions of extern int no_such_variable; from 1.434s to 1.133s. llvm-svn: 168394
* 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
* PR14381: Never skip constexpr function bodies when code-completing. We may needRichard Smith2012-11-194-2/+42
| | | | | | them in order to parse the rest of the file. llvm-svn: 168327
* When adding a NamedDecl to a correction, add the underlying Decl (viaKaelyn Uhrain2012-11-192-1/+15
| | | | | | | | getUnderlyingDecl()) so that derivatives of CorrectionCandidateCallback::ValidateCandidate(...) don't have to worry about being thrown by UsingDecls and such. llvm-svn: 168317
* Add -ldl for non-static libgcc in Android.Logan Chien2012-11-192-3/+14
| | | | | | | | | | | According to Android ABI, we have to link with libdl.so, if we are linking with non-static libgcc. Besides, this also fixes MIPS link error of undefined references to `_Unwind_Find_FDE' and `dl_iterate_phdr'. llvm-svn: 168310
* Enable -fuse-init-array for Android X86/MIPS.Logan Chien2012-11-192-2/+19
| | | | | | | | | | | | The dynamic linker of Android does not support .ctors/.dtors. We should emit .init_array and .fini_array regardless the gcc version. NOTE: This patch does not affect the ARM backend, because it is required to generate .init_array and .fini_array for program targeting ARM AAPCS and AEABI. llvm-svn: 168309
* clang/test: Suppress two tests on LLP64 target, Windows x64.NAKAMURA Takumi2012-11-192-0/+4
| | | | llvm-svn: 168303
* Completely re-work how the Clang driver interprets PIC and PIE options.Chandler Carruth2012-11-197-188/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were numerous issues here that were all entangled, and so I've tried to do a general simplification of the logic. 1) The logic was mimicing actual GCC bugs, rather than "features". These have been fixed in trunk GCC, and this fixes Clang as well. Notably, the logic was always intended to be last-match-wins like any other flag. 2) The logic for handling '-mdynamic-no-pic' was preposterously unclear. It also allowed the use of this flag on non-Darwin platforms where it has no actual meaning. Now this option is handled directly based on tests of how llvm-gcc behaves, and it is only supported on Darwin. 3) The APIs for the Driver's ToolChains had the implementation ugliness of dynamic-no-pic leaking through them. They also had the implementation details of the LLVM relocation model flag names leaking through. 4) The actual results of passing these flags was incorrect on Darwin in many cases. For example, Darwin *always* uses PIC level 2 if it uses in PIC level, and Darwin *always* uses PIC on 64-bit regardless of the flags specified, including -fPIE. Darwin never compiles in PIE mode, but it can *link* in PIE mode. 5) Also, PIC was not always being enabled even when PIE was. This isn't a supported mode at all and may have caused some fallout in builds with complex PIC and PIE interactions. The result is (I hope) cleaner and clearer for readers. I've also left comments and tests about some of the truly strage behavior that is observed on Darwin platforms. We have no real testing of Windows platforms and PIC, but I don't have the tools handy to figure that out. Hopefully others can beef up our testing here. Unfortunately, I can't test this for every platform. =/ If folks have dependencies on these flags that aren't covered by tests, they may break. I've audited and ensured that all the changes in behavior of the existing tests are intentional and good. In particular I've tried to make sure the Darwin behavior (which is more suprising than the Linux behavior) also matches that of 'gcc' on my mac. llvm-svn: 168297
* Remove a no-op 'const' from a by-value return type.Chandler Carruth2012-11-191-1/+1
| | | | llvm-svn: 168296
* RecursiveASTVisitor.h: Rework Doug's r160404, "Eliminating the GCC_CAST ↵NAKAMURA Takumi2012-11-191-12/+6
| | | | | | | | | | hack, take two." With this, ARCMT tests would not crash on certain hosts with g++ -O2, eg. cygwin g++-4.5.3. r160404 crashed mingw32-g++-4.4.0. I guess method's pointer in conditional expression could not be handled. llvm-svn: 168295
* Remove redundant (duplicated) check.Dmitri Gribenko2012-11-181-1/+1
| | | | llvm-svn: 168293
* clang/test/Sema/warn-documentation.cpp: Try to fix up the testcase in r168277.NAKAMURA Takumi2012-11-181-1/+1
| | | | llvm-svn: 168278
* Documentation parsing: propely handle a lone '\endverbatim' and emit a warning.Dmitri Gribenko2012-11-183-0/+32
| | | | | | | | We actually used to assert on this. Thanks to NAKAMURA Takumi for noticing this! llvm-svn: 168277
* Fix Doxygen comment start sequence.Dmitri Gribenko2012-11-171-1/+1
| | | | llvm-svn: 168276
* Clean up code according to coding standardsAndy Gibbs2012-11-171-3/+2
| | | | llvm-svn: 168274
* objective-C: Do not issue deprecated warning about implementationFariborz Jahanian2012-11-172-4/+26
| | | | | | | of a deprecated method in original class (or category), only in overrides. // rdar://12717705 llvm-svn: 168270
* Fix crash on end-of-file after \ in a char literal, fixes PR14369.Nico Weber2012-11-174-6/+32
| | | | | | | This makes LexCharConstant() look more like LexStringLiteral(), which doesn't have this bug. Add tests for eof after \ for several other cases. llvm-svn: 168269
* Prevent premature macro expansion in __has_builtin, __has_feature,Andy Gibbs2012-11-172-3/+23
| | | | | | | __has_attribute, __has_extension, making them behave more akin to conventional macros. llvm-svn: 168268
* Made the "expected string literal" diagnostic more expressiveAndy Gibbs2012-11-1714-15/+33
| | | | llvm-svn: 168267
* Refactored duplicate string literal lexing code within Preprocessor, into aAndy Gibbs2012-11-1711-154/+132
| | | | | | | | | | | | | common LexStringLiteral function. In doing so, some consistency problems have been ironed out (e.g. where the first token in the string literal was lexed with macro expansion, but subsequent ones were not) and also an erroneous diagnostic has been corrected. LexStringLiteral is complemented by a FinishLexStringLiteral function which can be used in the situation where the first token of the string literal has already been lexed. llvm-svn: 168266
OpenPOWER on IntegriCloud