summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [MSVC] Workaround for ICE in cl.exe when compiling ASTContext.cpp in Release ↵Will Wilson2015-10-271-1/+3
| | | | | | | | Win32 Microsoft connect bug: https://connect.microsoft.com/VisualStudio/feedback/details/1741530 llvm-svn: 251415
* Widen this enum bitfield by one bit to prevent sign extension in MSVCReid Kleckner2015-10-271-1/+1
| | | | llvm-svn: 251412
* Index: expose is_mutable_fieldSaleem Abdulrasool2015-10-277-0/+49
| | | | | | | | Expose isMutable via libClang and python bindings. Patch by Jonathan B Coe! llvm-svn: 251410
* [analyzer] Fix lambdas that are capturing constants.Gabor Horvath2015-10-272-7/+29
| | | | llvm-svn: 251407
* clang-format: Undo unwanted format change done in r251405.Daniel Jasper2015-10-273-15/+22
| | | | | | | | Specifically, don't wrap between the {} of an empty constructor if the "}" falls on column 81 and ConstructorInitializerAllOnOneLineOrOnePerLine is set. llvm-svn: 251406
* clang-format: Add an additional value to AlignAfterOpenBracket: AlwaysBreak.Daniel Jasper2015-10-278-87/+179
| | | | | | | | | | | | | | | | | | | | Summary: If this option is set, clang-format will always insert a line wrap, e.g. before the first parameter of a function call unless all parameters fit on the same line. This obviates the need to make a decision on the alignment itself. Use this style for Google's JavaScript style and add some minor tweaks to correctly handle nested blocks etc. with it. Don't use this option for for/while loops. Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D14104 llvm-svn: 251405
* [analyzer] Fix another crash when analyzing lambda functions.Gabor Horvath2015-10-272-1/+8
| | | | llvm-svn: 251404
* Properly clear current coroutine promise on FunctionScopeInfo reuse. ShouldRichard Smith2015-10-271-0/+1
| | | | | | hopefully make bots happy again. llvm-svn: 251397
* Access the right triple field for IAMCU.Michael Kuperstein2015-10-271-2/+2
| | | | llvm-svn: 251396
* Work around incomplete list initialization support in older MSVC.Richard Smith2015-10-272-5/+20
| | | | llvm-svn: 251391
* Handle target builtin options that are all required rather thanEric Christopher2015-10-274-56/+72
| | | | | | | | | | | | | | | | | only one of a group of possibilities. This changes the syntax in the builtin files to represent: , as the and operator | as the or operator The former syntax matches how the backend tablegen files represent multiple subtarget features being required. Updated the builtin and intrinsic headers accordingly for the new syntax. llvm-svn: 251388
* [coroutines] Creation of promise object, lookup of operator co_await, buildingRichard Smith2015-10-2736-132/+871
| | | | | | of await_* calls, and AST representation for same. llvm-svn: 251387
* Create undef reference to profile hook symbol Xinliang David Li2015-10-272-0/+15
| | | | | | | | | Create undef reference to profile hook symbol when PGO instrumentation is turned on. This allows LLVM to omit emission of hook variable use method for every single module instrumented. llvm-svn: 251385
* Be more conservative about diagnosing "incorrect" uses of __weak:John McCall2015-10-2713-90/+220
| | | | | | | | | | | | allow them to be written in certain kinds of user declaration and diagnose on the use-site instead. Also, improve and fix some diagnostics relating to __weak and properties. rdar://23228631 llvm-svn: 251384
* Use early exits to reduce indentation.Eric Christopher2015-10-271-46/+48
| | | | llvm-svn: 251371
* MismatchingNewDeleteDetector uses incorrect field, and finds no initializerIsmail Pazarbasi2015-10-262-2/+20
| | | | | | | | | | | | | | | Summary: In `MismatchingNewDeleteDetector::analyzeInClassInitializer`, if `Field`'s initializer expression is null, lookup the field in implicit instantiation, and use found field's the initializer. Reviewers: rsmith, rtrieu Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D9898 llvm-svn: 251335
* [analyzer] Added a missing test case for r251289.Gabor Horvath2015-10-261-0/+13
| | | | llvm-svn: 251313
* [analyzer] ccc-analyzer: Fix -isystem value passing.Devin Coughlin2015-10-261-1/+1
| | | | | | | | | | | | | | | The regex for -isystem matching is broken. -[D,I,Usystem] matches "-D", "-,", "-I", "-U", "-s" "-y", etc. Besides that, "-isystem /foo" gets interpreted as "-i" with a non-empty value "system" and thus the next "/foo" argument is not read. This patch corrects the regex. This fixes PR13237 <https://llvm.org/bugs/show_bug.cgi?id=13237>. A patch by Peter Wu! Differential Revision: http://reviews.llvm.org/D13800 llvm-svn: 251312
* [analyzer] Fixed a rare crash when analyzing lambda functions.Gabor Horvath2015-10-261-1/+1
| | | | llvm-svn: 251289
* clang-format: Fix false positive in cast detection.Daniel Jasper2015-10-262-1/+7
| | | | | | | | | | Before (with spaces in parentheses): void inFunction() { std::function<void( int, int )> fct; } After: void inFunction() { std::function<void( int, int)> fct; } llvm-svn: 251284
* [X86] Mark inregs correctly for MCU psABIMichael Kuperstein2015-10-252-5/+76
| | | | | | | | | The MCU psABI calling convention is somewhat, but not quite, like -mregparm 3. In particular, the rules involving structs are different. Differential Revision: http://reviews.llvm.org/D13978 llvm-svn: 251224
* [analyzer] scan-build: Teach ccc-analyzer about -Xclang.Devin Coughlin2015-10-251-0/+9
| | | | | | | | | Update ccc-analyzer to forward both -Xclang and its following argument to the the compiler driver. Previously we were dropping -Xclang and forwarding the argument on its own if it matched other forwarding criteria. This caused the argument to be interpreted as a driver rather than a frontend option. llvm-svn: 251218
* Simplify boolean conditional return statements in lib/Basic.Rafael Espindola2015-10-241-3/+3
| | | | | | Patch by Richard. llvm-svn: 251214
* clang/module.modulemap: s/Basic/BuiltinsR600.def/Basic/BuiltinsAMDGPU.def/NAKAMURA Takumi2015-10-241-1/+1
| | | | llvm-svn: 251182
* Fixup this testcase after r251120.Adrian Prantl2015-10-231-3/+5
| | | | | | I accidentally tested r251120 with assertions disabled. llvm-svn: 251126
* [ARM] Renaming +t2dsp feature into +dsp, as discussed on llvm-devArtyom Skrobov2015-10-232-12/+12
| | | | llvm-svn: 251124
* Module Debugging: Emit module debug info for types inside of Objective-CAdrian Prantl2015-10-234-0/+19
| | | | | | | | containers. rdar://problem/23196170 llvm-svn: 251120
* Remove a redundant check. NFCAdrian Prantl2015-10-231-2/+1
| | | | llvm-svn: 251116
* [StaticAnalyzer] Use llvm::utostr and not to_string.Davide Italiano2015-10-231-1/+2
| | | | | | | The latter seems unsupported (at least) on MinGW and FreeBSD (where I hit this failure). We can't have nice things. llvm-svn: 251115
* [AST] Plug a memory leak when promoting a single ParentMap entry to a vector.Benjamin Kramer2015-10-231-1/+1
| | | | | | Found by asan! llvm-svn: 251110
* [AST] Re-add TypeLocs and NestedNameSpecifierLocs to the ParentMap.Benjamin Kramer2015-10-239-46/+207
| | | | | | | | | | | | | | | | | | | | This relands r250831 after some fixes to shrink the ParentMap overall with one addtional tweak: nodes with pointer identity (e.g. Decl* and friends) can be store more efficiently so I put them in a separate map. All other nodes (so far only TypeLoc and NNSLoc) go in a different map keyed on DynTypedNode. This further uglifies the code but significantly reduces memory overhead. Overall this change still make ParentMap significantly larger but it's nowhere as bad as before. I see about 25 MB over baseline (pre-r251008) on X86ISelLowering.cpp. If this becomes an issue we could consider splitting the maps further as DynTypedNode is still larger (32 bytes) than a single TypeLoc (16 bytes) but I didn't want to introduce even more complexity now. Differential Revision: http://reviews.llvm.org/D14011 llvm-svn: 251101
* Use newly introduced interfaces in LLVM (NFC)Xinliang David Li2015-10-222-3/+3
| | | | | | | Replaced references to raw strings in instrumentation and coverage code. llvm-svn: 251072
* Define weak and __weak to mean ARC-style weak references, even in MRC.John McCall2015-10-2235-214/+572
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, __weak was silently accepted and ignored in MRC mode. That makes this a potentially source-breaking change that we have to roll out cautiously. Accordingly, for the time being, actual support for __weak references in MRC is experimental, and the compiler will reject attempts to actually form such references. The intent is to eventually enable the feature by default in all non-GC modes. (It is, of course, incompatible with ObjC GC's interpretation of __weak.) If you like, you can enable this feature with -Xclang -fobjc-weak but like any -Xclang option, this option may be removed at any point, e.g. if/when it is eventually enabled by default. This patch also enables the use of the ARC __unsafe_unretained qualifier in MRC. Unlike __weak, this is being enabled immediately. Since variables are essentially __unsafe_unretained by default in MRC, the only practical uses are (1) communication and (2) changing the default behavior of by-value block capture. As an implementation matter, this means that the ObjC ownership qualifiers may appear in any ObjC language mode, and so this patch removes a number of checks for getLangOpts().ObjCAutoRefCount that were guarding the processing of these qualifiers. I don't expect this to be a significant drain on performance; it may even be faster to just check for these qualifiers directly on a type (since it's probably in a register anyway) than to do N dependent loads to grab the LangOptions. rdar://9674298 llvm-svn: 251041
* [MS ABI] Don't crash when inheriting from base with trailing empty array memberDavid Majnemer2015-10-222-2/+26
| | | | | | | | | | We got this right for Itanium but not MSVC because CGRecordLayoutBuilder was checking if the base's size was zero when it should have been checking the non-virtual size. This fixes PR21040. llvm-svn: 251036
* Unbreak the shared cmake build. libToolingCore now depends on libAST.Benjamin Kramer2015-10-221-0/+1
| | | | llvm-svn: 251026
* Disable trigraph and escaped newline expansion on all types of raw string ↵Craig Topper2015-10-222-1/+25
| | | | | | literals not just ASCII type. llvm-svn: 251025
* [Tooling] Add a utility function to replace one nested name with another.Benjamin Kramer2015-10-225-0/+271
| | | | | | | | | | | | | | | | One problem in clang-tidy and other clang tools face is that there is no way to lookup an arbitrary name in the AST, that's buried deep inside Sema and might not even be what the user wants as the new name may be freshly inserted and not available in the AST. A common use case for lookups is replacing one nested name with another while minimizing namespace qualifications, so replacing 'ns::foo' with 'ns::bar' will use just 'bar' if we happen to be inside the namespace 'ns'. This adds a little helper utility for exactly that use case. Differential Revision: http://reviews.llvm.org/D13931 llvm-svn: 251022
* Attempt to fix build bot test failures.Gabor Horvath2015-10-222-2/+2
| | | | llvm-svn: 251014
* [analyzer] Bug identificationGabor Horvath2015-10-2240-8422/+11868
| | | | | | | | | | | | | | | | This patch adds hashes to the plist and html output to be able to identfy bugs for suppressing false positives or diff results against a baseline. This hash aims to be resilient for code evolution and is usable to identify bugs in two different snapshots of the same software. One missing piece however is a permanent unique identifier of the checker that produces the warning. Once that issue is resolved, the hashes generated are going to change. Until that point this feature is marked experimental, but it is suitable for early adoption. Differential Revision: http://reviews.llvm.org/D10305 Original patch by: Bence Babati! llvm-svn: 251011
* [AST] Remove redundant template keywords.Benjamin Kramer2015-10-221-3/+3
| | | | | | GCC complains about them, clang does not. llvm-svn: 251009
* [AST] Store Decl* and Stmt* directly into the ParentMap.Benjamin Kramer2015-10-222-20/+72
| | | | | | | | | | | | | | | | | | These are by far the most common types to be parents in the AST so it makes sense to optimize for them. Put them directly into the value of the map. This currently saves 32 bytes per parent in the map and a pointer indirection at the cost of some additional complexity in the code. Sadly this means we cannot return an ArrayRef from getParents anymore, add a proxy class that can own a single DynTypedNode and otherwise behaves exactly the same as ArrayRef. For example on a random large file (X86ISelLowering.cpp) this reduces the size of the parent map by 24 MB. Differential Revision: http://reviews.llvm.org/D13976 llvm-svn: 251008
* [MS ABI] Mangle static anonymous unionsDavid Majnemer2015-10-223-13/+13
| | | | | | | | | | | | We believed that internal linkage variables at global scope which are not variable template specializations did not have to be mangled. However, static anonymous unions have no identifier and therefore must be mangled. This fixes PR18204. llvm-svn: 250997
* clang driver toolchain refactoringXinliang David Li2015-10-225-57/+58
| | | | | | | | | | | | | | In this patch, the file static method addProfileRT is moved to be a virtual member function of base ToolChain class. This allows derived toolchain to override the default behavior easily and make it consistent with Darwin toolchain (a TODO was added for this refactoring - now removed). A new helper method is also introduced to test if instrumentation profile option is turned on or not. Differential Revision: http://reviews.llvm.org/D13326 llvm-svn: 250994
* [coroutines] Initial stub Sema functionality for handling coroutine await / ↵Richard Smith2015-10-2212-16/+234
| | | | | | yield / return. llvm-svn: 250993
* [coroutines] Add forgotten test for lexing coroutines keywords.Richard Smith2015-10-221-0/+12
| | | | llvm-svn: 250992
* [coroutines] Add overloaded unary 'operator co_await'.Richard Smith2015-10-227-0/+29
| | | | llvm-svn: 250991
* Convert ActOnForwardProtocolDeclaration to take an ArrayRef and use a ↵Craig Topper2015-10-223-12/+8
| | | | | | range-based for loop. NFC llvm-svn: 250990
* Use an ArrayRef<OffsetOfComponent> instead of pointer and size throughout ↵Craig Topper2015-10-224-23/+15
| | | | | | offsetof handling code. Also use a range-based for loop. NFC llvm-svn: 250989
* Change FindProtocolDeclaration to take an ArrayRef and use a range-based for ↵Craig Topper2015-10-223-18/+11
| | | | | | loop. NFC llvm-svn: 250988
* Change MacroInfo::setArgumentList to take an ArrayRef instead of pointer and ↵Craig Topper2015-10-223-11/+9
| | | | | | size. While there use std::copy intead of a manual loop. llvm-svn: 250987
OpenPOWER on IntegriCloud