summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Atomics: support __c11_* calls on _Atomic struct types.Tim Northover2015-11-093-38/+67
| | | | | | | | | | | | | When a struct's size is not a power of 2, the corresponding _Atomic() type is promoted to the nearest. We already correctly handled normal C++ expressions of this form, but direct calls to the __c11_atomic_whatever builtins ended up performing dodgy operations on the smaller non-atomic types (e.g. memcpy too much). Later optimisations removed this as undefined behaviour. This patch converts EmitAtomicExpr to allocate its temporaries at the full atomic width, sidestepping the issue. llvm-svn: 252507
* [analyzer] Fix assertion failure invalidating on const member function calls ↵Devin Coughlin2015-11-091-1/+3
| | | | | | | | (PR25392). We now return early when the 'this' value cannot be converted to a MemRegion. llvm-svn: 252506
* Moving FileManager::removeDotPaths to llvm::sys::path::remove_dotsMike Aizatsky2015-11-094-38/+5
| | | | | | Differential Revision: http://reviews.llvm.org/D14394 llvm-svn: 252501
* Use "auto" when the type name is redundantAlexander Kornienko2015-11-091-91/+79
| | | | | | | | | | | | Summary: Use "auto" when the type name is redundant Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14501 llvm-svn: 252494
* Adjust printQualifiedName to handle unscoped enums in a way similar to ↵Alexander Kornienko2015-11-091-0/+9
| | | | | | | | | | anonymous namespaces. Patch by Sterling Augustine! Differential revision: http://reviews.llvm.org/D14459 llvm-svn: 252488
* [EABI] Add Clang support for -meabi flagRenato Golin2015-11-093-0/+28
| | | | | | | | | | | | | | The -meabi flag to control LLVM EABI version. Without '-meabi' or with '-meabi default' imply LLVM triple default. With '-meabi gnu' sets EABI GNU. With '-meabi 4' or '-meabi 5' set EABI version 4 and 5 respectively. A similar patch was introduced in LLVM. Patch by Vinicius Tinti. llvm-svn: 252463
* [PGO] Code cleanup [NFC]Xinliang David Li2015-11-091-43/+2
| | | | | | | Use interfaces defined in LLVM to create FuncName and FuncNameVar. llvm-svn: 252434
* Replace tab with 8 spaces, NFC.Yaron Keren2015-11-081-1/+1
| | | | llvm-svn: 252426
* Remove spaces in empty line, NFC.Yaron Keren2015-11-071-1/+1
| | | | llvm-svn: 252405
* Make SemaBuiltinCpuSupports a static function. NFC.Craig Topper2015-11-071-21/+21
| | | | llvm-svn: 252399
* Use makeArrayRef instead of explicitly mentioning the type. NFCCraig Topper2015-11-071-1/+1
| | | | llvm-svn: 252398
* Fix indentation. NFCCraig Topper2015-11-071-3/+3
| | | | llvm-svn: 252397
* Add support for function attribute 'not_tail_called'.Akira Hatanaka2015-11-063-0/+29
| | | | | | | | | | | | | | | | | | | | | | This attribute is used to prevent tail-call optimizations to the marked function. For example, in the following piece of code, foo1 will not be tail-call optimized: int __attribute__((not_tail_called)) foo1(int); int foo2(int a) { return foo1(a); // Tail-call optimization is not performed. } The attribute has effect only on statically bound calls. It has no effect on indirect calls. Also, virtual functions and objective-c methods cannot be marked as 'not_tail_called'. rdar://problem/22667622 Differential Revision: http://reviews.llvm.org/D12922 llvm-svn: 252369
* StaticAnalyzer: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-11-061-6/+6
| | | | | | Remove implicit ilist iterator conversions from clangStaticAnalyzer. llvm-svn: 252360
* CodeGen: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-11-0611-28/+30
| | | | | | | Make ilist iterator conversions explicit in clangCodeGen. Eventually I'll remove them everywhere. llvm-svn: 252358
* [tsan] Add Clang frontend support for TSan on OS XKuba Brecka2015-11-061-0/+3
| | | | | | | | We're currently in process of porting TSan to OS X, and quite a few of the initial support in the runtime library has already landed in trunk. This patch actually enables "-fsanitize=thread" in the frontend. Differential Revision: http://reviews.llvm.org/D14440 llvm-svn: 252310
* Fix __builtin_signbit for ppcf128 typePetar Jovanovic2015-11-061-3/+13
| | | | | | | | | | | Function__builtin_signbit returns wrong value for type ppcf128 on big endian machines. This patch fixes how value is generated in that case. Patch by Aleksandar Beserminji. Differential Revision: http://reviews.llvm.org/D14149 llvm-svn: 252307
* [analyzer] Add VforkChecker to find unsafe code in vforked process.Yury Gribov2015-11-065-9/+253
| | | | | | | | | | | | This checker looks for unsafe constructs in vforked process: function calls (excluding whitelist), memory write and returns. This was originally motivated by a vfork-related bug in xtables package. Patch by Yury Gribov. Differential revision: http://reviews.llvm.org/D14014 llvm-svn: 252285
* Refactor: Simplify boolean conditional return statements in lib/ARCMigrateAlexander Kornienko2015-11-065-47/+18
| | | | | | | | Patch by Richard Thomson! (+a couple of modifications to address comments) Differential revision: http://reviews.llvm.org/D10009 llvm-svn: 252261
* Refactor: simplify boolean conditional return statements in lib/AnalysisAlexander Kornienko2015-11-061-4/+1
| | | | | | | | Patch by Richard Thomson! Differential revision: http://reviews.llvm.org/D10008 llvm-svn: 252256
* Fix crash in EmitDeclMetadata modeKeno Fischer2015-11-051-2/+4
| | | | | | | | | | | | | | | | | Summary: This fixes a bug that's easily encountered in LLDB (https://llvm.org/bugs/show_bug.cgi?id=22875). The problem here is that we mangle a name during debug info emission, but never actually emit the actual Decl, so we run into problems in EmitDeclMetadata (which assumes such a Decl exists). Fix that by just skipping metadata emissions for mangled names that don't have associated Decls. Reviewers: rjmccall Subscribers: labath, cfe-commits Differential Revision: http://reviews.llvm.org/D13959 llvm-svn: 252229
* CodeGen: Update for debug info API change.Peter Collingbourne2015-11-051-6/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D14266 llvm-svn: 252220
* PR25368: Replace workaround for build failure with modules enabled with a fixRichard Smith2015-11-052-1/+8
| | | | | | | | | | | for the root cause. The 'using llvm::isa;' declaration in Basic/LLVM.h only pulls the declarations of llvm::isa that were declared prior to it into namespace clang. In a modules build, this is a hermetic set of just the declarations from LLVM. In a non-modules build, we happened to also pull the declaration from lib/CodeGen/Address.h into namespace clang, which made the code in question accidentally compile. llvm-svn: 252211
* Improve macro dumping to preserve semantically-relevant spelling information.Richard Smith2015-11-051-5/+9
| | | | llvm-svn: 252206
* [WebAssembly] Update wasm builtin functions to match spec changes.Dan Gohman2015-11-051-7/+2
| | | | | | | The page_size operator has been removed from the spec, and the resize_memory operator has been changed to grow_memory. llvm-svn: 252201
* After some discussion, promote -fobjc-weak to a driver option.John McCall2015-11-052-7/+27
| | | | | | rdar://problem/23415863 llvm-svn: 252187
* [analyzer] Update RegionStoreManager::getBinding to handle BlockDataRegionsDevin Coughlin2015-11-051-0/+4
| | | | | | | | | | | | Update RegionStoreManager::getBinding() to return UnknownVal when trying to get the binding for a BlockDataRegion. Previously, getBinding() would try to cast the BlockDataRegion to a TypedValueRegion and crash. This happened when a block was passed as a parameter to an inlined function for which StackHintGeneratorForSymbol::getMessage() tried to generate a stack hint message. rdar://problem/21291971 llvm-svn: 252185
* [ARM] Clang gives unintended warning message for 'mthumb' + M-profiles:Alexandros Lamprineas2015-11-051-3/+2
| | | | | | | | | $ clang --target=armv7m-none-eabi -mthumb -march=armv7-m -c test.c clang-3.8: warning: argument unused during compilation: '-mthumb' Differential Revision: http://reviews.llvm.org/D14384 llvm-svn: 252175
* Allow use of private headers in different sub-modules.Manuel Klimek2015-11-051-10/+3
| | | | llvm-svn: 252170
* [x86] Additional small fix for MCU psABI supportAndrey Bokhanko2015-11-051-2/+6
| | | | | | | | This patch fixes one more thing in MCU psABI support: LongDoubleWidth should be set to 64. Differential Revision: http://reviews.llvm.org/D14285 llvm-svn: 252156
* Use profile data template file for covmap func record (NFC)Xinliang David Li2015-11-051-11/+10
| | | | llvm-svn: 252147
* Make ArgumentAdjuster aware of the current file being processed.Alexander Kornienko2015-11-053-9/+7
| | | | | | | | | | | | | | Summary: This is needed to handle per-project configurations when adding extra arguments in clang-tidy for example. Reviewers: klimek, djasper Subscribers: djasper, cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D14191 llvm-svn: 252134
* TestModuleFileExtension.cpp: Include <cstdio> explicitly for fprintf(3).NAKAMURA Takumi2015-11-051-0/+1
| | | | llvm-svn: 252128
* [modules] Don't merge an anonymous enum definition into a named enum definition.Richard Smith2015-11-051-3/+5
| | | | llvm-svn: 252125
* Fix build breakDavid Majnemer2015-11-051-2/+1
| | | | llvm-svn: 252120
* [Lex] Add __has_builtin support for __make_integer_seqDavid Majnemer2015-11-051-1/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D14349 llvm-svn: 252115
* [modules] If we're given a module file, via -fmodule-file=, for a module, butRichard Smith2015-11-053-15/+42
| | | | | | | | | we can't load that file due to a configuration mismatch, and implicit module building is disabled, and the user turns off the error-by-default warning for that situation, then fall back to textual inclusion for the module rather than giving an error if any of its headers are included. llvm-svn: 252114
* The control expression for a _Generic selection expression should haveAaron Ballman2015-11-051-5/+7
| | | | | | | its type decayed and qualifiers stripped when determining which selection it matches. Fixes PR16340. llvm-svn: 252104
* clang-format: Turn on wrapping before "else" for WebKit style.Daniel Jasper2015-11-041-0/+1
| | | | llvm-svn: 252089
* Fix some Clang-tidy modernize warnings, other minor fixes.Eugene Zelenko2015-11-045-39/+42
| | | | | | Differential revision: http://reviews.llvm.org/D14311 llvm-svn: 252081
* [analyzer] Add 'optin' checker package and move localizability checkers into it.Devin Coughlin2015-11-042-13/+44
| | | | | | | | | | | | | | | | | | | | | | This commit creates a new 'optin' top-level checker package and moves several of the localizability checkers into it. This package is for checkers that are not alpha and that would normally be on by default but where the driver does not have enough information to determine when they are applicable. The localizability checkers fit this criterion because the driver cannot determine whether a project is localized or not -- this is best determined at the IDE or build-system level. This new package is *not* intended for checkers that are too noisy to be on by default. The hierarchy under 'optin' mirrors that in 'alpha': checkers under 'optin' should be organized in the hierarchy they would have had if they were truly top level (e.g., optin.osx.cocoa.MyOptInChecker). Differential Revision: http://reviews.llvm.org/D14303 llvm-svn: 252080
* [modules] Generalize the workaround for multiple ambiguous definitions ofRichard Smith2015-11-042-29/+63
| | | | | | | | | | | | | internal linkage entities in different modules from r250884 to apply to all names, not just function names. This is really awkward: we don't want to merge internal-linkage symbols from separate modules, because they might not actually be defining the same entity. But we don't want to reject programs that use such an ambiguous symbol if those internal-linkage symbols are in fact equivalent. For now, we're resolving the ambiguity by picking one of the equivalent definitions as an extension. llvm-svn: 252063
* [Concepts] Add diagnostics which fall under [dcl.spec.concept]p1Nathan Wilson2015-11-041-0/+5
| | | | | | | | | | | | Summary: Diagnose when the 'concept' specifier is used on a typedef or function parameter. Reviewers: rsmith, hubert.reinterpretcast, aaron.ballman, faisalv Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14316 llvm-svn: 252061
* Allow compound assignment expressions to be contracted when licensed by the ↵Stephen Canon2015-11-041-1/+1
| | | | | | language or pragma. llvm-svn: 252050
* Silence "enumeral and non-enumeral type in conditional expression" warning; NFC.Aaron Ballman2015-11-041-1/+1
| | | | llvm-svn: 252047
* [Sema] Implement __make_integer_seqDavid Majnemer2015-11-0412-2/+174
| | | | | | | | | | | | | | | | | | This new builtin template allows for incredibly fast instantiations of templates like std::integer_sequence. Performance numbers follow: My work station has 64 GB of ram + 20 Xeon Cores at 2.8 GHz. __make_integer_seq<std::integer_sequence, int, 90000> takes 0.25 seconds. std::make_integer_sequence<int, 90000> takes unbound time, it is still running. Clang is consuming gigabytes of memory. Differential Revision: http://reviews.llvm.org/D13786 llvm-svn: 252036
* [analyzer] Move the ObjCGenericsChecker out of the alpha package.Devin Coughlin2015-11-031-4/+4
| | | | | | | It is now in the osx.cocoa package and so will be on by default for Apple toolchains. llvm-svn: 251966
* Introduce module file extensions to piggy-back data onto module files.Douglas Gregor2015-11-0313-64/+560
| | | | | | | | | | | | | | | | | | | | | Introduce the notion of a module file extension, which introduces additional information into a module file at the time it is built that can then be queried when the module file is read. Module file extensions are identified by a block name (which must be unique to the extension) and can write any bitstream records into their own extension block within the module file. When a module file is loaded, any extension blocks are matched up with module file extension readers, that are per-module-file and are given access to the input bitstream. Note that module file extensions can only be introduced by programmatic clients that have access to the CompilerInvocation. There is only one such extension at the moment, which is used for testing the module file extension harness. As a future direction, one could imagine allowing the plugin mechanism to introduce new module file extensions. llvm-svn: 251955
* Simplify Sema::ProcessPropertyDecl. NFCDouglas Gregor2015-11-032-22/+7
| | | | | | | | Now that the properties created within Objective-C class extensions go into the extension themselves, we don't need any of the extra complexity here. llvm-svn: 251949
* Remove unused #includeDavid Majnemer2015-11-031-1/+0
| | | | | | No functionality change is intended. llvm-svn: 251941
OpenPOWER on IntegriCloud