summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't actually generate code for testing the frontend's target cpu flag,Chandler Carruth2014-12-091-26/+28
| | | | | | | just verify. This should fix the bots where the x86 backend isn't built into Clang. Sorry for the breakage. llvm-svn: 223779
* Re-work the Clang system for classifying Intel x86 CPUs to use theirChandler Carruth2014-12-093-38/+204
| | | | | | | | | | | | | | | | | | | | | | | | basic microarchitecture names, and add support (with tests) for parsing all of the masic microarchitecture names for CPUs documented to be accepted by GCC with -march. I didn't go back through the 32-bit-only old microarchitectures, but this at least brings the recent architecture names up to speed. This is essentially the follow-up to the LLVM commit r223769 which did similar cleanups for the LLVM CPUs. One particular benefit is that you can now use -march=westmere in Clang and get the LLVM westmere processor which is a different ISA variant (!) and so quite significant. Much like with r223769, I would appreciate the Intel folks carefully thinking about the macros defined, names used, etc for the atom chips and newest primary x86 chips. The current patterns seem quite strange to me, especially here in Clang. Note that I haven't replicated the per-microarchitecture macro defines provided by GCC. I'm really opposed to source code using these rather than using ISA feature macros. llvm-svn: 223776
* Revert "[modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1."Duncan P. N. Exon Smith2014-12-0913-97/+28
| | | | | | | | | | | | | This reverts commit r223753. It broke the Green Dragon build for a few hours: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/2259/ http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-incremental_build/2259/consoleFull#43901905849ba4694-19c4-4d7e-bec5-911270d8a58c I suspect `clang-tools-extra` just needs a follow-up for an API change, but I'm not the right one to look into it. llvm-svn: 223759
* [modules] Add experimental -fmodule-map-file-home-is-cwd flag to -cc1.Richard Smith2014-12-0913-28/+97
| | | | | | | | | | | | | For files named by -fmodule-map-file=, and files found by 'extern module' directives, this flag specifies that we should resolve filenames relative to the current working directory rather than relative to the directory in which the module map file resides. This is aimed at fixing path handling, in particular for relative -I paths, when building modules that represent components of the current project (rather than libraries installed on the current system, which the current project has as dependencies, where we'd typically expect the module map files to be looked up implicitly). llvm-svn: 223753
* MS ABI: Add another test for PR20017David Majnemer2014-12-091-0/+10
| | | | llvm-svn: 223733
* DebugInfo: Correctly identify the location of C++ member initializer list ↵David Blaikie2014-12-095-40/+55
| | | | | | | | | | | | | elements This particularly helps the fidelity of ASan reports (which can occur even in these examples - if, for example, one uses placement new over a buffer of insufficient size - now ASan will correctly identify which member's initialization went over the end of the buffer). This doesn't cover all types of members - more coming. llvm-svn: 223726
* [modules] If the same .pcm file is imported via two different paths, don'tRichard Smith2014-12-092-1/+52
| | | | | | complain that the contained modules are defined twice. llvm-svn: 223724
* Revert "Driver: Objective-C should respect -fno-exceptions"David Majnemer2014-12-094-22/+46
| | | | | | | | This reverts commit r223455. It's been succesfully argued that -fexceptions (at the driver level) is a misnomer and has little to do with -fobjc-exceptions. llvm-svn: 223723
* Add a test for MS-ABI this adjustment for virtual calls to member operators.Nico Weber2014-12-081-6/+45
| | | | | | | They too were fixed by r223185, despite the commit message saying otherwise. Add a test that makes sure they don't regress. llvm-svn: 223714
* Handle possible TypoExprs in member initializers.Kaelyn Takata2014-12-082-0/+12
| | | | | | | Includes a new test case since none of the existing tests were hitting this code path. llvm-svn: 223705
* DebugInfo: Ensure the store for an assignment is attributed to the beginning ↵David Blaikie2014-12-082-0/+28
| | | | | | of the assignment expression llvm-svn: 223699
* clang-format: Indent correctly in conditional expressions after return.Daniel Jasper2014-12-082-1/+7
| | | | | | | | | | | | | | | | | | | This only applies when not aligning after the return itself (which is commonly done for C++. Before: return aaaaaaaaaa ? bbbbbbbbbb( bbbbbb) // This is indented relative to aaaaaaaaaa. : b; After: return aaaaaaaaaa ? bbbbbbbbbb( bbbbbb) : b; llvm-svn: 223694
* Fix isInstantiated and isInTemplateInstantiation to not recreate the ↵Samuel Benzaquen2014-12-083-9/+35
| | | | | | | | | | | | | | | | | | matchers on each call. Summary: Store the result matcher after the first call and reuse it later on. Recreating the matchers just to use them once incurs in a lot of unnecessary temporary memory allocations. This change speeds up our clang-tidy benchmarks by ~2%. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D6564 llvm-svn: 223690
* clang-format: [Java] Always break after annotations of multiline decls.Daniel Jasper2014-12-083-5/+10
| | | | | | | | | | | | | Before: @Mock DataLoader loooooooooooooooooooooooader = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; After: @Mock DataLoader loooooooooooooooooooooooader = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; llvm-svn: 223688
* clang-format: Make clang-format-diff.py format java files.Daniel Jasper2014-12-081-1/+1
| | | | llvm-svn: 223685
* InstrProf: Use LLVM's -instrprof pass for profilingJustin Bogner2014-12-0811-287/+70
| | | | | | | | The logic for lowering profiling counters has been moved to an LLVM pass. Emit the intrinsics rather than duplicating the whole pass in clang. llvm-svn: 223683
* clang-format: Support commas in lambda return types.Daniel Jasper2014-12-082-0/+2
| | | | | | | | | | Before: auto next_pair = [](A * a) -> pair<A*, A*>{}; After: auto next_pair = [](A* a) -> pair<A*, A*>{}; llvm-svn: 223652
* clang/test/Index/usrs.cpp: Appease targeting msvc.NAKAMURA Takumi2014-12-081-1/+1
| | | | llvm-svn: 223649
* [libclang] Use same USR encoding for 'char' regardless of what the target ↵Argyrios Kyrtzidis2014-12-081-1/+1
| | | | | | | | considers the sign to be. Should fix the clang-hexagon-elf bot. llvm-svn: 223642
* [libclang] Encode InjectedClassNameType in the USR.Argyrios Kyrtzidis2014-12-082-0/+11
| | | | llvm-svn: 223634
* [libclang] Encode location info for anonymous embedded tag decls.Argyrios Kyrtzidis2014-12-082-1/+11
| | | | | | Otherwise the USR will conflict with different embedded tag decls. llvm-svn: 223633
* [libclang] Use same USR encoding for 'class' as 'struct'.Argyrios Kyrtzidis2014-12-086-61/+61
| | | | | | | | 'class' and 'struct' can be used interchangebly for forward references. Use the same encoding otherwise we may get into a weird situation where the USR for the same declaration is different based on whether the definition of the tag reference is visible or not. llvm-svn: 223632
* [libclang] Encode C++11 rvalue reference types in the USR.Argyrios Kyrtzidis2014-12-082-0/+7
| | | | llvm-svn: 223631
* [libclang] Encode the C++11 method reference qualifier in the USR.Argyrios Kyrtzidis2014-12-082-0/+13
| | | | llvm-svn: 223630
* [libclang] Reflect in USR generation that 'signed char' and 'unsigned char' ↵Argyrios Kyrtzidis2014-12-082-1/+11
| | | | | | can overload a 'char' in C++, by giving them distinct encodings. llvm-svn: 223629
* [libclang] Function templates can be 'overloaded' by return type, so encode ↵Argyrios Kyrtzidis2014-12-086-21/+50
| | | | | | | | the return type in the USR and handle DependentNameType in order to be able to distinguish them. llvm-svn: 223628
* clang-format: Don't merge lines with comments.Daniel Jasper2014-12-072-0/+8
| | | | | | | | | | | | | | Before: int f() { // comment return 42; } After: int f() { // comment return 42; } This fixes llvm.org/PR21769. llvm-svn: 223609
* Add some file content to avoid test failures on content-addressed file systems.Richard Smith2014-12-062-0/+2
| | | | llvm-svn: 223596
* Add test file missed from r223561.Richard Smith2014-12-061-0/+3
| | | | llvm-svn: 223595
* Rename a couple of preprocessor symbols to be more descriptive. NFC.Paul Robinson2014-12-063-11/+11
| | | | | | Review feedback from recent changes to GetSVN.cmake. llvm-svn: 223578
* [modules] If we import a module, and we've seen a module map that describes theRichard Smith2014-12-0610-4/+60
| | | | | | | | | module, use the path from the module map file in preference to the path from the .pcm file when resolving relative paths in the .pcm file. This allows diagnostics (and .d output) to give relative paths if the module was found via a relative path. llvm-svn: 223577
* No memcpy for copy ctor with -fsanitize-address-field-padding=1Kostya Serebryany2014-12-062-2/+4
| | | | | | | | | | | | | | | | | | | Summary: When -fsanitize-address-field-padding=1 is present don't emit memcpy for copy constructor. Thanks Nico for the extra test case. Test Plan: regression tests Reviewers: thakis, rsmith Reviewed By: rsmith Subscribers: rsmith, cfe-commits Differential Revision: http://reviews.llvm.org/D6515 llvm-svn: 223563
* PR21217: Slightly more eagerly load -fmodule-map-file= files and provideRichard Smith2014-12-065-18/+12
| | | | | | diagnostics if they don't exist. Based on a patch by John Thompson! llvm-svn: 223561
* Additional safety for the root cause of regression in r223443; make the moduleRichard Smith2014-12-061-0/+1
| | | | | | map path more canonical before hashing it. No functionality change. llvm-svn: 223547
* [modules] Instead of storing absolute paths in a .pcm file, store the path toRichard Smith2014-12-057-155/+221
| | | | | | | | | | | | | | | the root of the module and use paths relative to that directory wherever possible. This is a step towards allowing explicit modules to be relocated without being rebuilt, which is important for some kinds of distributed builds, for good paths in diagnostics, and for appropriate .d output. This is a recommit of r223443, reverted in r223465; when joining together imported file paths, we now use the system's separator rather than always using '/'. This avoids path mismatches between the original module build and the module user on Windows (at least, in some cases). A more comprehensive fix will follow. llvm-svn: 223539
* ASTDumper: print whether a function is constexprHans Wennborg2014-12-052-5/+9
| | | | llvm-svn: 223538
* Specify the name of the generated header only once. NFC.Paul Robinson2014-12-051-4/+7
| | | | | | This will also simplify a private patch that we have. llvm-svn: 223537
* Make DiagnosticErrorTrap work even if SuppressAllDiagnostics is enabled.Richard Smith2014-12-053-10/+61
| | | | | | Patch by Brad King! llvm-svn: 223525
* Workaround attribute ordering issue with kernel only attributesMatt Arsenault2014-12-054-8/+28
| | | | | | | | | | | Placing the attribute after the kernel keyword would incorrectly reject the attribute, so use the smae workaround that other kernel only attributes use. Also add a FIXME because there are two different phrasings now for the same error, althoug amdgpu_num_[sv]gpr uses a consistent one. llvm-svn: 223490
* Use else if when checking multiple attributes.Matt Arsenault2014-12-051-4/+2
| | | | | | Only one of these can really match. llvm-svn: 223489
* Amending r223468 with this documentation change.Aaron Ballman2014-12-051-2/+2
| | | | llvm-svn: 223479
* Fix Typos in include/clang-c/Index.hChad Rosier2014-12-051-5/+5
| | | | | | Phabricator revision: http://reviews.llvm.org/D6507 llvm-svn: 223471
* Modify __has_attribute so that it only looks for GNU-style attributes. ↵Aaron Ballman2014-12-055-7/+11
| | | | | | Removes the ability to look for generic attributes and keywords via this macro, which has the potential to be a breaking change. However, since there is __has_cpp_attribute and __has_declspec_attribute, and given the limited usefulness of querying a generic attribute name regardless of syntax, this seems like the correct path forward. llvm-svn: 223468
* Added a new preprocessor macro: __has_declspec_attribute. This can be used ↵Aaron Ballman2014-12-054-1/+49
| | | | | | as a way to determine whether Clang supports a __declspec spelling for a given attribute, similar to __has_attribute and __has_cpp_attribute. llvm-svn: 223467
* Temporarily reverting r223443 due to bot breakage.Aaron Ballman2014-12-057-221/+153
| | | | llvm-svn: 223465
* Fix a warning with generating the attribute documentation; NFC.Aaron Ballman2014-12-051-1/+2
| | | | llvm-svn: 223463
* clang-format: Support NS_OPTIONS, CF_ENUM and CF_OPTIONS.Daniel Jasper2014-12-053-1/+23
| | | | | | This fixes llvm.org/PR21756. llvm-svn: 223458
* Driver: Objective-C should respect -fno-exceptionsDavid Majnemer2014-12-054-46/+22
| | | | | | | | | | | | Clang attempted to replicate a GCC bug: -fobjc-exceptions forces -fexceptions to be enabled. However, this has unintended effects and other awkard side effects that Clang doesn't "correctly" ape (e.g. it's impossible to turn off C++ exceptions in ObjC++ mode). Instead, -f[no]objc-exceptions and -f[no]cxx-exceptions now have an identical relationship with -f[no]exceptions. llvm-svn: 223455
* Driver: Cleanup -fexceptions behaviorDavid Majnemer2014-12-051-48/+15
| | | | | | | No functionality change is intended, just a cleanup of the logic clang uses to determine what -fexceptions/-fno-exceptions ends up doing. llvm-svn: 223453
* [OPENMP] Test for 'omp barrier' directiveAlexey Bataev2014-12-051-0/+41
| | | | llvm-svn: 223445
OpenPOWER on IntegriCloud