summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* AST: Update URL for Itanium ABI specDavid Majnemer2013-12-131-1/+1
| | | | | | | | The old URL hasn't worked for quite some time. While we are here, also change the link so that it will send us straight to the mangling portion of the ABI doc. llvm-svn: 197195
* Move C++ destructor emission into CGCXXABIReid Kleckner2013-12-134-20/+56
| | | | | | | No functionality change. Only Itanium C++ destructors have implicit VTT parameters. llvm-svn: 197194
* [-cxx-abi microsoft] Add commentary for mangleStaticGuardVariableDavid Majnemer2013-12-131-0/+9
| | | | | | | We will need to do some work here if we want to play nice with MSVC2013. Add a TODO indicating what changed and why this matters. llvm-svn: 197193
* Revert "[-cxx-abi microsoft] Mangle reference temporaries"David Majnemer2013-12-131-3/+4
| | | | | | | | | This reverts commit r197184. Richard Smith brings up some good points, a proper implementation will require us to mangle unnameable entities compatibly with MSVC. llvm-svn: 197192
* Remove getVTT* in favor of getStructorImplicitParameter*Reid Kleckner2013-12-132-14/+4
| | | | | | | No functionality change. The only remaining uses were in ItaniumCXXABI, which knows the implicit parameter is a VTT. llvm-svn: 197189
* Enhance "auto synthesis will not synthesize property in protocol" to include ↵Ted Kremenek2013-12-121-2/+4
| | | | | | | | property and protocol name. Implements <rdar://problem/15617839>. llvm-svn: 197187
* [ms-abi] Fixing bitfields sema arror for ms-modeWarren Hunt2013-12-121-1/+2
| | | | | | | | The check for bitfields that are longer than their base type needed to be checked in microsoft mode (cl.exe does not support the C++ extnetion for bitfields longer than their type). llvm-svn: 197186
* PR18229: Fix typo in assert condition.Richard Smith2013-12-121-1/+1
| | | | llvm-svn: 197185
* [-cxx-abi microsoft] Mangle reference temporariesDavid Majnemer2013-12-121-4/+3
| | | | | | | They are mangled the same as normal references, nothing special is going on here. llvm-svn: 197184
* [ms-abi] Refactoring Non-virtual base layout in record layoutWarren Hunt2013-12-121-69/+39
| | | | | | | | | This refactor addresses bugzilla bug 18167 and simplifies the code at the same time. Also I add a test case for the bug. Also I make a non-functional change to the basic layout lit tests to make them more reliable (using CHECK-NEXT instead of CHECK). llvm-svn: 197183
* Replace use of Triple::getEnvironmentName with the simplerJoerg Sonnenberger2013-12-121-4/+9
| | | | | | Triple::getEnvironment. llvm-svn: 197181
* Unify type trait parsingAlp Toker2013-12-125-269/+62
| | | | | | | | | | | | | | | | | Type trait parsing is all over the place at the moment with unary, binary and n-ary C++11 type traits that were developed independently at different points in clang's history. There's no good reason to handle them separately -- there are three parsers, three AST nodes and lots of duplicated handling code with slightly different implementations and diags for each kind. This commit unifies parsing of type traits and sets the stage for further consolidation. No change in behaviour other than more consistent error recovery. llvm-svn: 197179
* With the new update to the ABI, we should not look for installationsYaron Keren2013-12-121-16/+12
| | | | | | | | | | | of MinGW older than 4.7 with incompatible C++ libraries. This patch makes clang look for all MinGW versions from 4.7: 4.7.0, 4.7.1, 4.7.2, 4.7.3 4.8.0, 4.8.1, 4.8.2. llvm-svn: 197176
* [Modules] Don't parse any module map if modules are disabled.Argyrios Kyrtzidis2013-12-121-0/+5
| | | | | | Fixes rdar://15644663. llvm-svn: 197165
* Switch to the new MingW ABI.Rafael Espindola2013-12-121-0/+4
| | | | | | | GCC 4.7 changed the MingW ABI. On the clang side this means that methods now have the thiscall calling convention by default. llvm-svn: 197164
* Avoid temporary std::string.Rafael Espindola2013-12-122-6/+5
| | | | llvm-svn: 197160
* Don't return a pointer to a temporary std::string's c_str.Rafael Espindola2013-12-122-4/+5
| | | | llvm-svn: 197157
* Simple refactoring to eliminate single-use local variableBernard Ogden2013-12-121-3/+1
| | | | llvm-svn: 197154
* Refactor duplicate functionsBernard Ogden2013-12-123-236/+146
| | | | | | | | | | getARMCPU and getLLVMArchSuffixForARM existed as very similar functions in both ToolChain.cpp and Tools.cpp. Create a single implementation of each in Tools.cpp, eliminate the duplicate and share via Tools.h. Creates an 'arm' namespace in Tools.h to be used by any ARM-targetting tools. llvm-svn: 197153
* Make thumb the default instruction set for v7m and v7emBernard Ogden2013-12-121-1/+2
| | | | llvm-svn: 197152
* Fix -mthumb resetting of target cpuBernard Ogden2013-12-122-1/+29
| | | | | | | | Passing -mthumb with no explicit CPU on the command line resulted in target CPU changing from the architecture default to arm7tdmi. Now it does not. llvm-svn: 197151
* Suppress -Wshadow / -Wold-style-cast expanded from system header macrosAlp Toker2013-12-122-3/+5
| | | | | | | | Thanks to Jonathan Sauer for providing initial test cases. Fixes PR16093 and PR18147. llvm-svn: 197150
* Darwin-embedded: find correct libclang_rt for embedded targets.Tim Northover2013-12-124-76/+131
| | | | | | | | | | | | This refactors some of the Darwin toolchain classification to give a more solid distinction between the three primary Darwin platforms (OS X, IOS and IOS simulator) so that a 4th choice can be added temporarily: embedded MachO targets. Longer term, this support will be factored out into a separate class and no longer classified as "darwin-eabi", but the refactoring should still be useful. llvm-svn: 197148
* Filter-out irrelevant command-line options in CommonOptionsParser.Alexander Kornienko2013-12-121-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Leave only -help, -version and options from the specified category. Updated clang-check and clang-tidy. As clang-tidy is in a separate repository, here's the diff: Index: tools/extra/clang-tidy/tool/ClangTidyMain.cpp =================================================================== --- tools/extra/clang-tidy/tool/ClangTidyMain.cpp (revision 197024) +++ tools/extra/clang-tidy/tool/ClangTidyMain.cpp (working copy) @@ -39,7 +39,7 @@ // FIXME: Add option to list name/description of all checks. int main(int argc, const char **argv) { - CommonOptionsParser OptionsParser(argc, argv); + CommonOptionsParser OptionsParser(argc, argv, ClangTidyCategory); SmallVector<clang::tidy::ClangTidyError, 16> Errors; clang::tidy::runClangTidy(Checks, OptionsParser.getCompilations(), Reviewers: djasper, klimek Reviewed By: djasper CC: cfe-commits, revane, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2379 llvm-svn: 197139
* Implemented GNU-style formatting for compound statements.Alexander Kornienko2013-12-124-25/+52
| | | | | | | | | | | | | | | | Summary: Added BraceBreakingStyle::BS_GNU. I'm not sure about the correctness of static initializer formatting, but compound statements should be fine. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2372 llvm-svn: 197138
* PR17602: check accessibility when performing an implicit derived-to-baseRichard Smith2013-12-121-9/+10
| | | | | | | conversion on the LHS of a .* or ->*. Slightly improve diagnostics in case of an ambiguous base class. llvm-svn: 197125
* Re-apply r197076 and r197086; the build was fixed by chapuni in r197114.Hans Wennborg2013-12-122-38/+340
| | | | llvm-svn: 197116
* Revert r197076: "[objcmt] When emitting a remap file, use a json formatHans Wennborg2013-12-122-340/+38
| | | | | | | | | | | | | | | | | | with the edit entries, instead of applying the changes" (And also revert the follow-up r197086.) This seems to have broken Linux builds, which were failing with the following: /build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so: error: undefined reference to 'clang::ento::objc_retain::CallEffects::getEffect(clang::ObjCMethodDecl const*)' /build/buildbot/osu8/clang-x86_64-linux-selfhost-rel/llvm.obj/Release+Asserts/lib/libclang.so: error: undefined reference to 'clang::ento::objc_retain::CallEffects::getEffect(clang::FunctionDecl const*)' collect2: error: ld returned 1 exit status llvm-svn: 197111
* Added a Subjects clause to the section attribute and made its diagnostics ↵Aaron Ballman2013-12-121-6/+0
| | | | | | more consistent with other attributes. llvm-svn: 197104
* PR18217: Rewrite JumpDiagnostics' handling of temporaries, to correctly handleRichard Smith2013-12-122-95/+54
| | | | | | | | | declarations that might lifetime-extend multiple temporaries. In passing, fix a crasher (PR18217) if an initializer was dependent and exactly the wrong shape, and remove a bogus function (Expr::findMaterializedTemporary) now its last use is gone. llvm-svn: 197103
* Objective-C migrator: when inferring 'readonly' property of anFariborz Jahanian2013-12-121-1/+3
| | | | | | | Objective-C object conforming to 'NSCopying' protocol, infer a 'copy' property, instead of 'strong'. // rdar://15525937 llvm-svn: 197102
* Use llvm::Regex::Escape in VerifyDiagnosticConsumer.cppHans Wennborg2013-12-121-31/+1
| | | | | | This depends on LLVM r197096. llvm-svn: 197101
* Add CFG tests for switch's involving "extended" enum.Ted Kremenek2013-12-111-1/+3
| | | | llvm-svn: 197094
* Add new PrintingPolicy entry to trim number of newlines. Useful for the CFG ↵Ted Kremenek2013-12-111-7/+14
| | | | | | | | | printer. The change isn't completely comprehensive. This can be filled in lazily as needed. There is one consumer right now. llvm-svn: 197093
* Change semantics of regex expectations in the diagnostic verifierHans Wennborg2013-12-111-6/+91
| | | | | | | | | | | | | | | | | | | | | | | Previously, a line like // expected-error-re {{foo}} treats the entirety of foo as a regex. This is inconvenient when matching type names containing regex characters. For example, to match "void *(class test8::A::*)(void)" inside such a regex, one would have to type "void \*\(class test8::A::\*\)\(void\)". This patch changes the semantics of expected-error-re to only treat the parts of the directive wrapped in double curly braces as regexes. This avoids the escaping problem and leads to nicer patterns for those cases; see e.g. the change to test/Sema/format-strings-scanf.c. (The balanced search for closing }} of a directive also makes us handle the full directive in test\SemaCXX\constexpr-printing.cpp:41 and :53.) Differential Revision: http://llvm-reviews.chandlerc.com/D2388 llvm-svn: 197092
* [AArch64] Refactor NEON floating-point Max/Min/Maxnm/Minnm across vector AArch64Chad Rosier2013-12-111-4/+4
| | | | | | intrinsics to use f32 types, rather than their vector equivalents. llvm-svn: 197091
* Remove extra qualification to fix build with g++ after r197076Alp Toker2013-12-111-1/+1
| | | | llvm-svn: 197086
* [ms-abi][cleanup] Removing FinalizeCXXLayout : no functional changeWarren Hunt2013-12-111-10/+1
| | | | | | | After r196549 there is no need to separate FinalizeCXXLayout and FinalizeLayout so they were merged and FinalizeCXXLayout was eliminated. llvm-svn: 197083
* No longer accepting attribute spellings with prefix and suffix underscores ↵Aaron Ballman2013-12-111-9/+13
| | | | | | except for GNU attributes, or C++11-style attributes in the GNU namespace. This prevents attributes such as __declspec(__dllexport__) or [[__noreturn__]] from being treated as known attributes. llvm-svn: 197082
* [objcmt] When emitting a remap file, use a json format with the edit ↵Argyrios Kyrtzidis2013-12-112-38/+340
| | | | | | | | | | | entries, instead of applying the changes to a temp file directly. This allows to combine the edits when they can be different based on whether you saw the implementation or not, e.g. with the designated initializer migration. llvm-svn: 197076
* [objcmt] When whitelisting the headers we want to modify, allow changing theArgyrios Kyrtzidis2013-12-111-9/+43
| | | | | | | | | | the ObjC implementation declarations, just don't change implementations for classes that are not in the whitelisted headers. For example, if we change a method to return 'instancetype' we should also update the method definition in the implementation. llvm-svn: 197075
* [AArch64] Add NEON scalar floating-point compare LLVM AArch64 intrinsics thatChad Rosier2013-12-111-31/+31
| | | | | | use f32/f64 types, rather than their vector equivalents. llvm-svn: 197071
* [AArch64] Refactor the NEON scalar floating-point reciprocal step andChad Rosier2013-12-111-5/+5
| | | | | | | floating-point reciprocal square root step LLVM AArch64 intrinsics to use f32/f64 types, rather than their vector equivalents. llvm-svn: 197070
* [AArch64] Refactor the NEON scalar floating-point reciprocal estimate, floating-Chad Rosier2013-12-111-5/+5
| | | | | | | | point reciprocal exponent, and floating-point reciprocal square root estimate LLVM AArch64 intrinsics to use f32/f64 types, rather than their vector equivalents. llvm-svn: 197069
* [ms-cxxabi] Fix linkage of dtor thunks for anonymous classesReid Kleckner2013-12-111-6/+8
| | | | | | | | | | We were mistakengly giving linkonce_odr linkage instead of internal linkage to the deleting and complete destructor thunks for classes in anonymous namespaces. Fixes PR17273. llvm-svn: 197060
* [analyzer] Add checker callbacks for MemberExpr and UnaryExprOrTypeTraitExpr.Jordan Rose2013-12-112-79/+98
| | | | | | Found by Arthur Yoo! llvm-svn: 197059
* Better diagnostic for static override when methods are thiscall by defaultHans Wennborg2013-12-111-0/+7
| | | | | | | | | | | | | | | | | | Methods are thiscall by default in the MS ABI, and also in MinGW targetting GCC 4.7 or later. This changes the diagnostic from the technically correct but hard to understand: virtual function 'foo' has different calling convention attributes ('void ()') than the function it overrides (which has calling convention 'void () __attribute__((thiscall))') to the more intuitive and also correct: 'static' member function 'foo' overrides a virtual function We already have a test for this. Let's just run it in both ABI modes. Differential Revision: http://llvm-reviews.chandlerc.com/D2375 llvm-svn: 197055
* Add front-end infrastructure now address space casts are in LLVM IR.David Tweed2013-12-1110-7/+44
| | | | | | | | | | With the introduction of explicit address space casts into LLVM, there's a need to provide a new cast kind the front-end can create for C/OpenCL/CUDA and code to produce address space casts from those kinds when appropriate. Patch by Michele Scandale! llvm-svn: 197036
* Modules: Let -fmodules-decluse ignore headers that aren't in a moduleDaniel Jasper2013-12-112-18/+28
| | | | | | | | | | | Includes might always pull in arbitrary header or data files outside of modules. Among others, this includes builtin includes, which do not have a module (story) yet. Also cleanup implementation of ModuleMap::findModuleForHeader() to be non-recursive. llvm-svn: 197034
* Turning IAS on by default on ARM/ThumbRenato Golin2013-12-112-7/+4
| | | | | | | | | | | | This is an experimental feature, where -integrated-as will be on by default on ARM/Thumb. We aim to detect the missing features so that the next release is stable. Updating the ReleaseNotes, too. Also moving the AArch64 into the same place. llvm-svn: 197024
OpenPOWER on IntegriCloud