summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Downgrade bogus ExtWarn on duplicate 'friend' specifier to a Warning, and add aRichard Smith2014-01-103-8/+37
| | | | | | Warning for a duplicate 'constexpr' specifier. llvm-svn: 198956
* [analyzer] Model getters of known-@synthesized Objective-C properties.Jordan Rose2014-01-107-8/+276
| | | | | | | | | | | | | | | | | | | | | ...by synthesizing their body to be "return self->_prop;", with an extra nudge to RetainCountChecker to still treat the value as +0 if we have no other information. This doesn't handle weak properties, but that's mostly correct anyway, since they can go to nil at any time. This also doesn't apply to properties whose implementations we can't see, since they may not be backed by an ivar at all. And finally, this doesn't handle properties of C++ class type, because we can't invoke the copy constructor. (Sema has actually done this work already, but the AST it synthesizes is one the analyzer doesn't quite handle -- it has an rvalue DeclRefExpr.) Modeling setters is likely to be more difficult (since it requires handling strong/copy), but not impossible. <rdar://problem/11956898> llvm-svn: 198953
* ObjectiveC. Remove warning on mismatched methodsFariborz Jahanian2014-01-104-62/+7
| | | | | | | | | which may belong to unrelated classes. It was primarily intended for miuse of @selector expression. But warning is too noisy and will be issued when an actual @selector is used. // rdar://15740134 llvm-svn: 198952
* Implement -m32 and -m64 with llvm::Triple functions.Jakob Stoklund Olesen2014-01-102-12/+15
| | | | | | Don't repeat the 32 <-> 64 architecture mapping incompletely. llvm-svn: 198943
* Remove unexpected code completion handling from ConsumeToken()Alp Toker2014-01-101-8/+4
| | | | | | | | | | | | | | | | | | With this change tok::code_completion is finally handled exclusively as a special token kind like other tokens that need special treatment. All callers have been updated to use the specific token consumption methods and the parser has a clear idea the current token isn't special by the time ConsumeToken() gets called, so this has been unreachable for some time. ConsumeAnyToken() behaviour is unchanged and will continue to support unexpected code completion as part of the special token path. This survived an amount of fuzzing and validation, but please ping the list if you hit a code path that previously relied on the old unexpected handler and now asserts. llvm-svn: 198942
* Enable -fuse-init-array for all AArch64 ELF targets by default, not just linux.Kristof Beyls2014-01-104-15/+31
| | | | llvm-svn: 198940
* Use 'w' instead of 'c' to represent the win32 mangling.Rafael Espindola2014-01-102-4/+4
| | | | | | | This change was requested to avoid confusion if we ever support non windows coff systems. llvm-svn: 198939
* Update LangOpt descriptionsAlp Toker2014-01-101-3/+3
| | | | | | | | | | | | Based on recent discussions, attempt to provide a clearer distinction between MicrosoftMode and MicrosoftExt. This still doesn't feel perfect but gives a better idea which is which. Also update the CPlusPlus11 description which got missed in r171367. C++0x is dead, long live C++0x! llvm-svn: 198936
* TryConsume parser cleanupsAlp Toker2014-01-104-62/+28
| | | | | | Also move some comments into the block they were meant to describe. llvm-svn: 198935
* clang-format: Slightly adapt line break in edge case.Daniel Jasper2014-01-102-3/+3
| | | | | | | | | | | | | | | Before: SomeMap[std::pair(aaaaaaaaaaaa, bbbbbbbbbbbbbbb)] .insert(ccccccccccccccccccccccc); After: SomeMap[std::pair(aaaaaaaaaaaa, bbbbbbbbbbbbbbb)].insert( ccccccccccccccccccccccc); This seems to be about 3:1 more common in Google and Chromium style and I found only a handful of instances inside the LLVM codebase. llvm-svn: 198924
* Use the right dynamic linker for SPARC Linux executables.Jakob Stoklund Olesen2014-01-102-1/+6
| | | | llvm-svn: 198923
* reapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; ↵Kostya Serebryany2014-01-101-0/+7
| | | | | | this time LeakSanitizerIsTurnedOffForTheCurrentProcess is used instead of __lsan_is_turned_off llvm-svn: 198922
* clang-format: Understand ObjC boxed expressions.Daniel Jasper2014-01-102-0/+3
| | | | | | | | | Before: [dictionary setObject:@(1)forKey:@"number"]; After: [dictionary setObject:@(1) forKey:@"number"]; llvm-svn: 198920
* Locate GCC installations on SPARC systems.Jakob Stoklund Olesen2014-01-101-0/+28
| | | | llvm-svn: 198918
* Make the tautological out of range warning use Sema::DiagRuntimeBehavior so thatRichard Trieu2014-01-102-3/+32
| | | | | | the warning will not trigger on code protected by compile time checks. llvm-svn: 198913
* Give the linker the right ELF type for SPARC targets.Jakob Stoklund Olesen2014-01-102-0/+16
| | | | llvm-svn: 198912
* Pass -32/-64 to the assembler when building for sparc/sparc64.Jakob Stoklund Olesen2014-01-102-0/+18
| | | | llvm-svn: 198911
* [ms-abi] Handle __declspec(align) on bitfields "properly"Warren Hunt2014-01-102-26/+152
| | | | | | | | | | __declspec(align), when applied to bitfields affects their perferred alignment instead of their required alignment. We don't know why. Also, #pragma pack(n) turns packing *off* if n is greater than the pointer size. This is now observable because of the impact of declspec(align) on bitfields. llvm-svn: 198907
* CGRecordLayoutBuilder.cpp: Clarify if-else. [-Wdangling-else]NAKAMURA Takumi2014-01-101-1/+2
| | | | llvm-svn: 198906
* ObjectiveC. 1) Warn when @dynamic (as well as synthesize) Fariborz Jahanian2014-01-103-16/+20
| | | | | | | | | property has the naming convention that implies 'ownership'. 2) improve on diagnostic and make it property specific. 3) fix the line number in the case of default property synthesis. // rdar://15757510 llvm-svn: 198905
* Reapply r198845, reverted in r198849, with a fix to make it valid C++98, notRichard Smith2014-01-102-84/+86
| | | | | | | | | | | just valid C++11 =) Original commit message: PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on SPARC, where uint64_t apparently requires higher alignment than void*. llvm-svn: 198903
* [ms-abi] Fixing CGRecordLayoutBuilder w.r.t. MS NonVirutalBase LayoutWarren Hunt2014-01-093-7/+91
| | | | | | | | | | | | | | The MS abi lays out *all* non-virtual bases with leading vfptrs before laying out non-virutal bases without vfptrs. This guarantees that the primary base is laid out first. r198818 fixed RecordLayoutBuilder to produce compatiable layouts. This patch fixes CGRecordLayoutBuilder to be able to consume those layouts and produce meaningful output without tripping any asserts about assumed incoming layout. A test case is included that shows CGRecordLayoutBuilder in fact produces output in the compatiable order. llvm-svn: 198900
* Updating documentation for the __has_attribute changes landed in r198897.Aaron Ballman2014-01-092-2/+8
| | | | llvm-svn: 198899
* __has_attribute now understands target-specific attributes. So when you ask ↵Aaron Ballman2014-01-093-9/+56
| | | | | | whether an ARM target has the "interrupt" attribute, it will return true for ARM and MSP430 targets, and false for others. llvm-svn: 198897
* Removing the notion of TargetAttributesSema and replacing it with one where ↵Aaron Ballman2014-01-0911-378/+367
| | | | | | the parsed attributes are responsible for knowing their target-specific nature, instead of letting Sema figure it out. This is necessary so that __has_attribute can eventually determine whether a parsed attribute applies to the given target or not. llvm-svn: 198896
* Fix ast-dump-color.cpp test following r198883Alp Toker2014-01-091-1/+1
| | | | | | The commit added a source location that used to be missing from the AST. llvm-svn: 198892
* Use getPointerSizeInBits.Rafael Espindola2014-01-091-2/+3
| | | | | | | I introduced this bug in 198815. Thanks for Mark Lacey for noticing. Unfortunately, I have no idea how to test this code. llvm-svn: 198891
* Preserve -fretain-comments-from-system-headers in modulesBen Langmuir2014-01-093-2/+9
| | | | | | | | Preserves the setting of -fretain-comments-from-system-headers when building/saving/loading module files. This allows code completion to pick up documentation comments from system modules. llvm-svn: 198890
* Have attribute 'objc_precise_lifetime' suppress -Wunused.Ted Kremenek2014-01-092-1/+11
| | | | | | | | | | Fixes <rdar://problem/15596883> In ARC, __attribute__((objc_precise_lifetime)) guarantees that the object stored in it will survive to the end of the variable's formal lifetime. It is therefore useful even if it completely unused. llvm-svn: 198888
* Attempting to appease the build bots on systems with ansi escape sequences.Aaron Ballman2014-01-091-5/+8
| | | | llvm-svn: 198887
* Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"Alp Toker2014-01-091-7/+0
| | | | | | | | | | | To declare or define reserved identifers is undefined behaviour in standard C++. This needs to be addressed in compiler-rt before it can be used in LLVM. See the list discussion for details. This reverts commit r198858. llvm-svn: 198885
* Removing a bit of custom parsing functionality used by the thread safety ↵Aaron Ballman2014-01-099-60/+80
| | | | | | analysis APIs. Now using tablegen to determine whether an attribute's arguments should be parsed in an unevaluated context instead of relying on a separate, hard-coded list of attributes. llvm-svn: 198883
* clang-format: Add @s when breaking NSString literals.Daniel Jasper2014-01-093-4/+15
| | | | | | | | While it is allowed to not have an @ on subsequent lines, it seems general practice to add them. If undesired, the code author can easily remove them again and clang-format won't re-add them. llvm-svn: 198871
* clang-format: Understand #pragma markDaniel Jasper2014-01-092-0/+20
| | | | | | | | | Before: #pragma mark Any non - hyphenated or hyphenated string(including parentheses). After: #pragma mark Any non-hyphenated or hyphenated string (including parentheses). llvm-svn: 198870
* clang-format: Some tweaks to braces list formatting:Daniel Jasper2014-01-094-26/+66
| | | | | | | | | - Format a braced list with one element per line if it has nested braced lists. - Use a column layout only when the list has 6+ elements (instead of the current 4+ elements). llvm-svn: 198869
* The OpenCL specification states that images are allocated Pekka Jaaskelainen2014-01-093-10/+18
| | | | | | | | | | | from the global address space (6.5.1 of the OpenCL 1.2 specification). This makes clang construct the image arguments in the global address space and generate the argument metadata with the correct address space descriptor. Patch by Pedro Ferreira! llvm-svn: 198868
* check-clang: Add dependencies to PrintFunctionNames and ↵NAKAMURA Takumi2014-01-091-0/+2
| | | | | | SampleAnalyzerPlugin, for r198747 and r198820. llvm-svn: 198867
* Disable LeakSanitizer in TableGen binaries, see PR18325Kostya Serebryany2014-01-091-0/+7
| | | | llvm-svn: 198858
* Fix leak in lib/CodeGen/CGException.cpp, PR18318Kostya Serebryany2014-01-092-0/+10
| | | | | | | | | | | | | | Summary: This fixes the leak described in http://llvm.org/bugs/show_bug.cgi?id=18318 Reviewers: chandlerc, dblaikie Reviewed By: chandlerc CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2474 llvm-svn: 198857
* In areVectorOperandsLaxBitCastable() allow bitcast between a vector and scalar.Argyrios Kyrtzidis2014-01-092-8/+24
| | | | | | rdar://15779837. llvm-svn: 198856
* Revert "PR18427: Use an appropriately-aligned buffer in APValue, to avoid a ↵Argyrios Kyrtzidis2014-01-092-85/+84
| | | | | | | | | crash on" It broke building. This reverts commit r198845. llvm-svn: 198849
* PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash onRichard Smith2014-01-092-84/+85
| | | | | | SPARC, where uint64_t apparently requires higher alignment than void*. llvm-svn: 198845
* Update Clang's CFGBlock interface to conform to the strange part ofChandler Carruth2014-01-092-5/+4
| | | | | | | | | | | | | LLVM's Value interface which is used in LLVM's DominatorTree analysis and which changed in LLVM r198836. The DominatorTree analysis is actually a generic graph analysis and should be moved to LLVM's support library to clarify that Clang and others are using it with arbitrary graphs. Further, it seems likely that it should be using something other than printAsOperand, but this is a simpler build fix. I'll clean this up later. llvm-svn: 198840
* Fix the clang -Werror build after r198818David Blaikie2014-01-091-1/+1
| | | | llvm-svn: 198837
* PR18401: Fix assert by implementing the current proposed direction of coreRichard Smith2014-01-097-44/+44
| | | | | | | issue 1430. Don't allow a pack expansion to be used as an argument to an alias template unless the corresponding parameter is a parameter pack. llvm-svn: 198833
* [ms-abi] Fixed failing lit test.Warren Hunt2014-01-091-1/+1
| | | | | | This test adjustment was missing from the previous patch. llvm-svn: 198822
* Add a test for Static Analyzer checker pluginsAlp Toker2014-01-091-0/+10
| | | | llvm-svn: 198820
* [ms-abi] Refactor Microsoft Record LayoutWarren Hunt2014-01-0924-2988/+3245
| | | | | | | | | This patch refactors microsoft record layout to be more "natural". The most dominant change is that vbptrs and vfptrs are injected after the fact. This simplifies the implementation and the math for the offest for the first base/field after the vbptr. llvm-svn: 198818
* Used the DataLayout methods instead of the Module methods.Rafael Espindola2014-01-091-4/+2
| | | | llvm-svn: 198815
* Implement isCXX11FinalKeyword() in terms of isCXX11VirtSpecifier()Alp Toker2014-01-091-34/+19
| | | | | | | | | | | | It's not worth keeping two copies of the identifier init and comparison code just to save a pointer coparison. This should reduce further once we get proper contextual keywords in the token stream, so having the identifier checks in one place is a step towards that. Cleanup only. llvm-svn: 198814
OpenPOWER on IntegriCloud