summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [modules] When instantiating the contents of an imported CXXRecordDecl, we canRichard Smith2015-08-115-7/+22
| | | | | | | | emit lexical contents for a declaration for another module. Track which module those contents came from, and ensure that we only grab the lexical contents from a single such instantiation. llvm-svn: 244682
* [MIPS] Use arch values for lock-free atomic operationsPetar Jovanovic2015-08-111-2/+1
| | | | | | | | | Let NaClMips32ELTargetInfo inherit arch values for maximum width lock-free atomic operations. Differential Revision: http://reviews.llvm.org/D11949 llvm-svn: 244675
* [analyzer] Incorrect env variable replaced.Anton Yartsev2015-08-111-1/+1
| | | | llvm-svn: 244673
* Add an assert to catch lexical decl deserialization bugs.Richard Smith2015-08-111-0/+1
| | | | llvm-svn: 244671
* Fixing a few C++0x comments to be C++11; NFC.Aaron Ballman2015-08-111-3/+3
| | | | llvm-svn: 244670
* Add missing documentation for conversionDecl; NFC.Aaron Ballman2015-08-111-0/+12
| | | | llvm-svn: 244669
* Add a polymorphic AST matcher for testing whether a constructor or a ↵Aaron Ballman2015-08-114-0/+62
| | | | | | conversion declaration is marked as explicit or not. llvm-svn: 244666
* Add an AST matcher to match member intializers of a CXXCtorInitializer.Aaron Ballman2015-08-114-0/+44
| | | | llvm-svn: 244662
* clang-format: Make SpaceBeforeParens work with overloaded operators.Daniel Jasper2015-08-112-1/+5
| | | | | | Patch by Jon Chesterfield, thank you! llvm-svn: 244660
* [MSVC Compatibility] Classify ext_ms_cast_fn_obj as DefaultErrorDavid Majnemer2015-08-112-2/+2
| | | | | | | | This non-conforming extension was introduced to make it possible for us to correctly compile <atomic> in VS 2013 and 2015. Let's limit its impact to system headers to encourage portable code. llvm-svn: 244650
* Revert "[CUDA] Add implicit __attribute__((used)) to all __global__ functions."Daniel Jasper2015-08-112-19/+0
| | | | | | This is breaking internal test. I'll provide a reproduction. llvm-svn: 244583
* This patch fixes the assert in emitting captured code in the target data ↵Michael Wong2015-08-111-1/+3
| | | | | | | | | construct. This is on behalf of Kelvin Li. http://reviews.llvm.org/D11475 llvm-svn: 244569
* Propagate SourceLocations through to get a Loc on float_cast_overflowFilipe Cabecinhas2015-08-117-110/+152
| | | | | | | | | | | | | | | Summary: float_cast_overflow is the only UBSan check without a source location attached. This patch propagates SourceLocations where necessary to get them to the EmitCheck() call. Reviewers: rsmith, ABataev, rjmccall Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11757 llvm-svn: 244568
* [MSVC Compat] Implement __is_destructible, __is_nothrow_destructibleDavid Majnemer2015-08-112-2/+84
| | | | | | | | Our implementations of these type trait intrinsics simply mapped them to __has_trivial_destructor. Instead, flesh these intrinsics out with a full implementation which matches the standard's description. llvm-svn: 244564
* Make the analysis reporting test with x86 to fix the hexagon build.Tyler Nowicki2015-08-111-2/+2
| | | | llvm-svn: 244561
* Print vectorization analysis when loop hint is specified.Tyler Nowicki2015-08-112-15/+42
| | | | | | This patche and a related llvm patch solve the problem of having to explicitly enable analysis when specifying a loop hint pragma to get the diagnostics. Passing AlwasyPrint as the pass name (see below) causes the front-end to print the diagnostic if the user has specified '-Rpass-analysis' without an '=<target-pass>’. Users of loop hints can pass that compiler option without having to specify the pass and they will get diagnostics for only those loops with loop hints. llvm-svn: 244556
* [modules] Don't suggest deleting the module cache on an error if there is no ↵Richard Smith2015-08-111-0/+1
| | | | | | module cache for this build. llvm-svn: 244547
* add commentDerek Schuff2015-08-111-0/+1
| | | | llvm-svn: 244542
* Add NaCl to long double/fp128 mangling testDerek Schuff2015-08-111-0/+3
| | | | | | | | | | | | | | | Summary: NaCl is a platform where long double is the same as double. Its mangling is spelled with "long double" but its ABI lowering is the same as double. Reviewers: rnk, chh Subscribers: jfb, cfe-commits, dschuff Differential Revision: http://reviews.llvm.org/D11922 llvm-svn: 244541
* [modules] Properly diagnose errors in module files for which we have noRichard Smith2015-08-113-10/+22
| | | | | | corresponding include location (those specified on the command line). llvm-svn: 244538
* Fix some tabs.Richard Smith2015-08-111-4/+3
| | | | llvm-svn: 244537
* Remove some dead code.Richard Smith2015-08-102-19/+1
| | | | llvm-svn: 244530
* Append options for vectorization when pointer checking threshold is exceeded.Tyler Nowicki2015-08-103-0/+34
| | | | | | Following one of the appended options will allow the loop to be vectorized. We do not include a command line option for modifying the pointer checking threshold because there is no clang-level interface for this currently. llvm-svn: 244526
* Add NaCl (a target where long double = double) to long double ABI testDerek Schuff2015-08-101-4/+24
| | | | | | | | | | | | | | A test was recently (r244468) added to cover long double calling convention codegen, distinguishing between Android and GNU conventions (where long doubles are fp128 and x86_fp80, respectively). Native Client is a target where long doubles are the same as doubles. This change augments the test to cover that case. Also rename the test to test/codeGen/X86_64-longdouble.c Differential Revision: http://reviews.llvm.org/D11921 llvm-svn: 244524
* Make frontend floating-point commutivity test X86 specific to avoid ↵Tyler Nowicki2015-08-101-1/+1
| | | | | | cost-model related problems on arm-thumb and hexagon. llvm-svn: 244517
* If a variable template is inside a context with template arguments that is ↵Nick Lewycky2015-08-102-0/+12
| | | | | | being instantiated, and that instantiation fails, fail our instantiation instead of crashing. Errors have already been emitted. llvm-svn: 244515
* Remove non-ascii characters.Tyler Nowicki2015-08-102-3/+3
| | | | llvm-svn: 244506
* Fix test case to work with -Asserts builds.Chih-Hung Hsieh2015-08-101-14/+13
| | | | | | | | | When clang is built with -DLLVM_ENABLE_ASSERTIONS=Off, it does not create names for IR values. Differential Revision: http://reviews.llvm.org/D11437 llvm-svn: 244502
* [CUDA] Add implicit __attribute__((used)) to all __global__ functions.Artem Belevich2015-08-102-0/+19
| | | | | | | | | This allows emitting kernels that were instantiated from the host code and which would never be explicitly referenced otherwise. Differential Revision: http://reviews.llvm.org/D11666 llvm-svn: 244501
* [CUDA] Added stubs for new attributes used by CUDA headers.Artem Belevich2015-08-103-0/+74
| | | | | | | | | The main purpose is to avoid errors and warnings while parsing CUDA header files. The attributes are currently unused otherwise. Differential version: http://reviews.llvm.org/D11690 llvm-svn: 244497
* Append options for floating-point commutivity when related diagnostics are ↵Tyler Nowicki2015-08-103-0/+35
| | | | | | | | produced. With this patch clang appends the command line options that would allow vectorization when floating-point commutativity is required. Specifically those are enabling fast-math or specifying a loop hint. llvm-svn: 244492
* Fix typo.Nick Lewycky2015-08-101-1/+1
| | | | llvm-svn: 244490
* [dllimport] A non-imported class with an imported key can't have a keyReid Kleckner2015-08-102-0/+14
| | | | | | | | | | | | | | | | | Summary: The vtable takes its DLL storage class from the class, not the key function. When they disagree, the vtable won't be exported by the DLL that defines the key function. The easiest way to ensure that importers of the class emit their own vtable is to say that the class has no key function. Reviewers: hans, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11913 llvm-svn: 244488
* [clang-cl] Add support for CL and _CL_ environment variablesDavid Majnemer2015-08-102-0/+38
| | | | | | | | | | cl uses 'CL' and '_CL_' to prepend and append command line options to the given argument vector. There is an additional quirk whereby '#' is transformed into '='. Differential Revision: http://reviews.llvm.org/D11896 llvm-svn: 244473
* Correct x86_64 fp128 calling conventionChih-Hung Hsieh2015-08-102-12/+143
| | | | | | | | | | | | | | | | These changes are for Android x86_64 targets to be compatible with current Android g++ and conform to AMD64 ABI. https://llvm.org/bugs/show_bug.cgi?id=23897 * Return type of long double (fp128) should be fp128, not x86_fp80. * Vararg of long double (fp128) could be in register and overflowed to memory. https://llvm.org/bugs/show_bug.cgi?id=24111 * Return value of long double (fp128) _Complex should be in memory like a structure of {fp128,fp128}. Differential Revision: http://reviews.llvm.org/D11437 llvm-svn: 244468
* Add new llvm.loop.unroll.enable metadata for use with "#pragma unroll".Mark Heffernan2015-08-1012-77/+124
| | | | | | | | | | | | | | | | | | | | | | This change adds the new unroll metadata "llvm.loop.unroll.enable" which directs the optimizer to unroll a loop fully if the trip count is known at compile time, and unroll partially if the trip count is not known at compile time. This differs from "llvm.loop.unroll.full" which explicitly does not unroll a loop if the trip count is not known at compile time With this change "#pragma unroll" generates "llvm.loop.unroll.enable" rather than "llvm.loop.unroll.full" metadata. This changes the semantics of "#pragma unroll" slightly to mean "unroll aggressively (fully or partially)" rather than "unroll fully or not at all". The motivating example for this change was some internal code with a loop marked with "#pragma unroll" which only sometimes had a compile-time trip count depending on template magic. When the trip count was a compile-time constant, everything works as expected and the loop is fully unrolled. However, when the trip count was not a compile-time constant the "#pragma unroll" explicitly disabled unrolling of the loop(!). Removing "#pragma unroll" caused the loop to be unrolled partially which was desirable from a performance perspective. llvm-svn: 244467
* Add WebKit brace style configuration option.Roman Kashitsyn2015-08-104-11/+59
| | | | | | | | | | | | | | | | | | Summary: Add brace style `BS_WebKit` as described on https://www.webkit.org/coding/coding-style.html: * Function definitions: place each brace on its own line. * Other braces: place the open brace on the line preceding the code block; place the close brace on its own line. Set brace style used in `getWebKitStyle()` to the newly added `BS_WebKit`. Reviewers: djasper, klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D11837 llvm-svn: 244446
* [Driver] Fix handling of -fbuiltin/-fcommon when combined with -mkernelJohn Brawn2015-08-102-24/+21
| | | | | | | | | | | -mkernel enables -fno-builtin and -fno-common by default, but allows -fbuiltin and -fcommon to override that. However "-fbuiltin -fno-builtin" is treated the same as "-fbuiltin" which is wrong, so fix that. Also fixes similar behaviour when -fno-common is default. Differential Revision: http://reviews.llvm.org/D11459 llvm-svn: 244437
* [Static Analyzer] Warn when inner and outer conditions are identical. The ↵Daniel Marjamaki2015-08-102-0/+50
| | | | | | | | inner condition is always true. Reviewed in http://reviews.llvm.org/D10892. llvm-svn: 244435
* [tests] Remove calls to grepFilipe Cabecinhas2015-08-101-3/+4
| | | | llvm-svn: 244433
* [MSVC] Crash fix: assigning of overloaded member function pointer caused ↵Alexey Bataev2015-08-102-0/+19
| | | | | | | | | assertion Original class was not marked with inheritance attribute and it causes a crash on codegen. Differential Revision: http://reviews.llvm.org/D11828 llvm-svn: 244428
* clang/test/Modules: Satisfy win32 hosts due to dospath issue.NAKAMURA Takumi2015-08-093-3/+3
| | | | llvm-svn: 244427
* [modules] Remove now-dead code for lazy loading of files specified by ↵Richard Smith2015-08-097-85/+3
| | | | | | -fmodule-file=. llvm-svn: 244417
* [modules] PR22534: Load files specified by -fmodule-file= eagerly. In ↵Richard Smith2015-08-0912-123/+190
| | | | | | particular, this avoids the need to re-parse module map files when using such a module. llvm-svn: 244416
* Unrevert r244412 (reverted in r244414), and delete the bogus line left behindRichard Smith2015-08-092-5/+9
| | | | | | in the unit test that was checking a file the test no longer creates. llvm-svn: 244415
* Revert "[modules] Don't leak -M flags for dependency file generation into ↵Justin Bogner2015-08-092-9/+4
| | | | | | | | | | | | | | | the module" This was failing tests on a bunch of bots: http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/29919/steps/check-all http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/29627/steps/check-all http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/9959/ http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/5591/ This reverts r244412 llvm-svn: 244414
* [modules] When building a dependency file, include module maps parsed in theRichard Smith2015-08-097-7/+76
| | | | | | current compilation, not just those from imported modules. llvm-svn: 244413
* [modules] Don't leak -M flags for dependency file generation into the moduleRichard Smith2015-08-092-4/+9
| | | | | | | | | | build process when we implicitly build a module. Previously, we'd create the specified .d file once for each implicitly-built module and then finally overwrite it with the correct contents after the requested build completes. (This fails if you use stdout as a dependency file, which is what the provided testcase does, and is how I discovered this brokenness.) llvm-svn: 244412
* [modules] Attach dependency listeners to the module manager once when it'sRichard Smith2015-08-091-9/+7
| | | | | | | | created, rather than creating and attaching a new listener each time we load a module file (yes, the old ones were kept around too!). No functionality change intended, but a bit more sanity. llvm-svn: 244411
* Add file missed from r244409.Richard Smith2015-08-091-0/+9
| | | | llvm-svn: 244410
OpenPOWER on IntegriCloud