summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* DebugInfo: Follow up to r219736, also test/demonstrate that we emit the ↵David Blaikie2014-10-161-2/+4
| | | | | | constant value in this case as well. llvm-svn: 219943
* Fixing comment grammar; NFC.Aaron Ballman2014-10-161-2/+1
| | | | llvm-svn: 219942
* Speculatively fix GCC 4.7 build after r219938Hans Wennborg2014-10-161-1/+1
| | | | llvm-svn: 219941
* Switching to range-based for loops; NFC.Aaron Ballman2014-10-161-10/+5
| | | | llvm-svn: 219940
* Fix code to follow the "Don’t use else after a return" rule.Samuel Benzaquen2014-10-161-7/+8
| | | | | | | | | | | | | | Summary: Fix code to follow the "Don’t use else after a return" rule. This is a followup from rL219792. Reviewers: alexfh Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D5826 llvm-svn: 219939
* Use iterators and algorithms to possibly make this code a bit tidierDavid Blaikie2014-10-161-16/+12
| | | | | | | | | | | | | (also, the code executed once the element was found was split half inside the loop and half after it - now put it all together after the find operation) I'm a bit concerned that this code is rather untested (commenting out this whole function and running check-clang doesn't fail any tests)... And I wish I had polymorphic lambdas. llvm-svn: 219938
* Remove one of SanitizerBlacklist::isIn() overloads. NFC.Alexey Samsonov2014-10-162-11/+15
| | | | | | | | The final goal is to get rid of all the rest overloads that accept LLVM objects (llvm::Function and llvm::GlobalVariable), and pass in source-level entities instead. llvm-svn: 219937
* Use array_lengthof; NFC.Hans Wennborg2014-10-161-1/+1
| | | | llvm-svn: 219935
* [AArch64] Enable A53 erratum workaround (835769) by default for Android targetsBradley Smith2014-10-163-0/+16
| | | | llvm-svn: 219933
* tests: move test to more appropriate locationSaleem Abdulrasool2014-10-161-0/+0
| | | | | | The test is a C++ semantic analysis test, move it to SemaCXX from Sema. NFC. llvm-svn: 219932
* OpenCL: Emit global variables in the constant addr space as constant globalsTom Stellard2014-10-167-7/+18
| | | | llvm-svn: 219929
* OpenCL: Add -ffake-address-space-map to a testTom Stellard2014-10-161-2/+2
| | | | | | The ensures there is an explicit address space id in the output. llvm-svn: 219928
* clang-format: Fix behavior with comments before conditional expressionsDaniel Jasper2014-10-162-0/+9
| | | | | | | | | | | | | | | Before: SomeFunction(aaaaaaaaaaaaaaaaa, // comment. ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb); After: SomeFunction(aaaaaaaaaaaaaaaaa, // comment. ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb); llvm-svn: 219921
* clang-format: [ObjC] Fix method expression detection.Daniel Jasper2014-10-162-4/+11
| | | | | | | | | | Before: return (a)[foo bar : baz]; After: return (a)[foo bar:baz]; llvm-svn: 219919
* Frontend: Fix some underscore-then-capital UBJustin Bogner2014-10-161-2/+2
| | | | llvm-svn: 219903
* specify dwarf version for SolarisAlexander Eremin2014-10-164-4/+11
| | | | llvm-svn: 219901
* PR21246: DebugInfo: Emit the appropriate type (cv qualifiers, ↵David Blaikie2014-10-1612-43/+35
| | | | | | | | | | | | | | | | | | | | | | | | | reference-ness, etc) for non-type template parameters Plumb through the full QualType of the TemplateArgument::Declaration, as it's insufficient to only know whether the type is a reference or pointer (that was necessary for mangling, but insufficient for debug info). This shouldn't increase the size of TemplateArgument as TemplateArgument::Integer is still longer by another 32 bits. Several bits of code were testing that the reference-ness of the parameters matched, but this seemed to be insufficient (various other features of the type could've mismatched and wouldn't've been caught) and unnecessary, at least insofar as removing those tests didn't cause anything to fail. (Richard - perchaps you can hypothesize why any of these checks might need to test reference-ness of the parameters (& explain why reference-ness is part of the mangling - I would've figured that for the reference-ness to be different, a prior template argument would have to be different). I'd be happy to add them in/beef them up and add test cases if there's a reason for them) llvm-svn: 219900
* Bugfix in template instantiation in CXXPseudoDestructorExpr.Alexey Bataev2014-10-162-4/+49
| | | | | | | Fix for clang crash when instantiating a template with qualified lookup for members in non-class types. Differential Revision: http://reviews.llvm.org/D5769 llvm-svn: 219897
* DebugInfo: Cleanup testing of non-type template parameters.David Blaikie2014-10-161-18/+32
| | | | | | | | | | Separate out the non-nullable parameters from the nullable ones (currently only the template template parameter) and demonstrate that cv-qualifiers aren't preserved for non-null parameters (but are preserved for null parameters) by adding 'const' to an int* non-type template parameter. llvm-svn: 219883
* [CMake] clangBasic: Add Core to LINK_COMPONENTS introduced by r219840.NAKAMURA Takumi2014-10-161-0/+1
| | | | llvm-svn: 219880
* Moving CGF::EmitAlignmentAssumption to IRBuilderHal Finkel2014-10-152-30/+4
| | | | | | | | The functionality contained in CodeGenFunction::EmitAlignmentAssumption has been moved to IRBuilder (so that it can also be used by LLVM-level code). Remove this now-duplicate implementation in favor of the IRBuilder code. llvm-svn: 219877
* CodeGen: Don't drop thread_local when emitting __thread aliasesDavid Majnemer2014-10-153-10/+23
| | | | | | | | | | | | CodeGen wouldn't mark the aliasee as thread_local if the aliasee was a tentative definition. Even if the definition was already emitted, it would never mark the alias as thread_local. This fixes PR21288. llvm-svn: 219859
* Move SanitizerBlacklist object from CodeGenModule to ASTContext.Alexey Samsonov2014-10-156-36/+37
| | | | | | | | Soon we'll need to have access to blacklist before the CodeGen phase (see http://reviews.llvm.org/D5687), so parse and construct the blacklist earlier. llvm-svn: 219857
* Avoid having "using namespace" for both "clang" and "llvm" namespaces.Alexey Samsonov2014-10-151-6/+5
| | | | | | | This is fragile, as there are classes with the same name in both namespaces (e.g. llvm::Module and clang::Module). llvm-svn: 219855
* Sema: handle AttributedTypeLocs in C++14 auto deductionSaleem Abdulrasool2014-10-152-2/+15
| | | | | | | | | | | | | | When performing a type deduction from the return type, the FunctionDecl may be attributed with a calling convention. In such a case, the retrieved type location may be an AttributedTypeLoc. Performing a castAs<FunctionProtoTypeLoc> on such a type loc would result in an assertion as they are not derived types. Ensure that we correctly handle the attributed type location by looking through it to the modified type loc. Fixes an assertion triggered in C++14 mode. llvm-svn: 219851
* test: simplify test furtherSaleem Abdulrasool2014-10-151-4/+7
| | | | | | Remove the use of an unnecessary function. NFC. llvm-svn: 219850
* Change hasName() to take const std::string&, as it was taking before rL219792.Samuel Benzaquen2014-10-151-1/+1
| | | | llvm-svn: 219849
* Move -fsanitize-blacklist to LangOpts from CodeGenOpts. NFC.Alexey Samsonov2014-10-155-7/+8
| | | | | | | | After http://reviews.llvm.org/D5687 is submitted, we will need SanitizerBlacklist before the CodeGen phase, so make it a LangOpt (as it will actually affect ABI / class layout). llvm-svn: 219842
* Move SanitizerBlacklist to clangBasic. NFC.Alexey Samsonov2014-10-155-8/+6
| | | | | | | | | | | | This change moves SanitizerBlacklist.h from lib/CodeGen to public Clang headers in include/clang/Basic. SanitizerBlacklist is currently only used in CodeGen to decide which functions/modules should be instrumented, but this will soon change as ASan will optionally modify class layouts during AST construction (http://reviews.llvm.org/D5687). We need blacklist machinery to be available at this point. llvm-svn: 219840
* As requested by Matt Thomas, use long long for intmax_t and int64_t onJoerg Sonnenberger2014-10-152-0/+111
| | | | | | PPC64/NetBSD. llvm-svn: 219839
* Set ABI and DescriptionString first to reduce OS specific logic.Joerg Sonnenberger2014-10-151-10/+13
| | | | | | Use switch for FreeBSD check to allow easier extension. llvm-svn: 219838
* Add llvm_unreachable after switch to avoid warnings about a missingKaelyn Takata2014-10-151-0/+1
| | | | | | | | return. Forgot to add this in r219818. llvm-svn: 219820
* Drop unneccessary default case from switch introduced in r219809Kaelyn Takata2014-10-151-2/+0
| | | | | | | | This silences: ../tools/clang/tools/libclang/CIndex.cpp:6451:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default] llvm-svn: 219818
* Revert "Fix late template parsing leak with incremental processing"Reid Kleckner2014-10-155-66/+6
| | | | | | | | This reverts commit r219810. The test suite appears broken. llvm-svn: 219813
* [analyzer] Perl scripts are run differently from makefiles. Sometimes ↵Anton Yartsev2014-10-152-0/+2
| | | | | | additional utilities are involved, e.g. 'env' utility that present in MSYS but is missing in MinGW. The patch unifies launch of "c++-analyzer" and "ccc-analyzer". llvm-svn: 219812
* Fix late template parsing leak with incremental processingReid Kleckner2014-10-155-6/+66
| | | | | | | | | | | | | Add a second late template parser callback meant to cleanup any resources allocated by late template parsing. Call it from the Sema::ActOnEndOfTranslationUnit method after all pending template instantiations have been completed. Teach Parser::ParseTopLevelDecl to install the cleanup callback when incremental processing is enabled so that Parser::TemplateIds can be freed. Patch by Brad King! llvm-svn: 219810
* [libclang] Add function to retrieve storage class in libclang.Argyrios Kyrtzidis2014-10-154-1/+121
| | | | | | Patch by guibufolo! llvm-svn: 219809
* Adding attributes to the IndirectFieldDecl that we generate for anonymous ↵Aaron Ballman2014-10-155-12/+43
| | | | | | struct/union fields. This fixes PR20930. llvm-svn: 219807
* Don't use a global_ctors comdat for globals that aren't externally visibleReid Kleckner2014-10-152-10/+24
| | | | | | | | In particular, if you have two identical templates in different TUs in anonymous namespaces, we would use the same global_ctors comdat key for both. As a result, only one would be run. llvm-svn: 219806
* CodeGen: Cleanup CGRecordLowering::lowerUnion a littleDavid Majnemer2014-10-151-7/+7
| | | | | | Remove some duplicated state, no functionality change intended. llvm-svn: 219805
* Fix for PR21254 - Assertion in comment parserDario Domizioli2014-10-154-5/+310
| | | | | | | | | | | | | The size of the ID field in CommandInfo was narrow, leading to potential wrap-around of command IDs, causing misinterpretation later on. The patch does the following: - It extends the ID bitfield from 8 to 20 bits. - It provides a DRY definition of the number of bits for the field to avoid using literal numbers in different files. - It introduces a new assertion that checks for the wrap-around. - It adds the testcase from PR21254. llvm-svn: 219802
* Update for llvm api change.Rafael Espindola2014-10-151-3/+2
| | | | llvm-svn: 219800
* Update for llvm api change.Rafael Espindola2014-10-151-0/+1
| | | | llvm-svn: 219797
* Turned Sema::HandleDelayedAvailabilityCheck into a static function; NFC.Aaron Ballman2014-10-152-102/+92
| | | | | | Did a bit of drive-by reformatting as well since it required rearranging some other static functions in the file. llvm-svn: 219795
* [analyzer] Handle 'mingw32-make' in the same way as 'make' and 'gmake'.Anton Yartsev2014-10-151-1/+1
| | | | llvm-svn: 219794
* Speed up hasName() matcher.Samuel Benzaquen2014-10-153-10/+75
| | | | | | | | | | | | | | | | | | Summary: Speed up hasName() matcher by skipping the expensive generation of the fully qualified name unless we need it. In the common case of matching an unqualified name, we don't need to generate the full name. We might not even need to copy any string at all. This change speeds up our clang-tidy benchmark by ~10% Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D5776 llvm-svn: 219792
* Fixed a comment. No functional changes.Alexander Kornienko2014-10-151-1/+1
| | | | llvm-svn: 219787
* CodeGen: Use the initing member's type for a union's storage type more oftenDavid Majnemer2014-10-152-1/+25
| | | | | | | | | | Unions are initialized with the default initialization of their first named member. If that member is not zero initialized, then we should prefer that member's type. Otherwise, we might try to make an otherwise unsuitable type (like an array) which we cannot easily initialize with a pointer to member. llvm-svn: 219781
* CodeGen: Fix a typo in a commentDavid Majnemer2014-10-151-1/+1
| | | | | | No functionality change intended. llvm-svn: 219780
* MS ABI: Use the correct this arg when generating implicit array copy ctorDavid Majnemer2014-10-152-3/+18
| | | | | | | We assumed the last argument of the copy constructor was the this pointer. However, this is not the case under the MS ABI. llvm-svn: 219775
OpenPOWER on IntegriCloud