summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [ms-inline asm] Update test case now that we are correctly parsing __emit ↵Chad Rosier2013-02-121-2/+2
| | | | | | directives. llvm-svn: 175000
* Fixing the MSVC compiler warning a different way; removed use of static_cast ↵Aaron Ballman2013-02-121-2/+2
| | | | | | and instead used a signed integer parameter. llvm-svn: 174996
* Typo.Chad Rosier2013-02-121-1/+1
| | | | llvm-svn: 174995
* [ms-inline asm] Add a few test cases for the parsing of hexidecimal integers.Chad Rosier2013-02-121-0/+34
| | | | llvm-svn: 174989
* Removing a signed/unsigned mismatch warning triggered in MSVC 11.Aaron Ballman2013-02-121-1/+1
| | | | llvm-svn: 174986
* Accept over-qualified constructor in MSVC emulation modeDmitri Gribenko2013-02-123-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSVC accepts this: class A { A::A(); }; Clang accepts regular member functions with extra qualification as an MS extension, but not constructors. This changes the parser to defer rejecting qualified constructors so that the same Sema logic can apply to constructors as regular member functions. This also improves the error message when MS extensions are disabled (in my opinion). Before it was: /Users/jason/Desktop/test.cpp:2:8: error: expected member name or ';' after declaration specifiers A::A(); ~~~~ ^ 1 error generated. After: /Users/jason/Desktop/test.cpp:2:6: error: extra qualification on member 'A' A::A(); ~~~^ 1 error generated. Patch by Jason Haslam. llvm-svn: 174980
* Fix bug in the adjustment to existing lines.Daniel Jasper2013-02-122-6/+12
| | | | | | | | | | | | Before (if only the second line was reformatted): void f() {} void g() {} After: void f() {} void g() {} llvm-svn: 174978
* Formatter: Correctly format stars in `sizeof(int**)` and similar places.Nico Weber2013-02-122-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This redoes how '*' and '&' are classified as pointer / reference markers when followed by ')', '>', or ','. Previously, determineStarAmpUsage() marked a single '*' and '&' followed by ')', '>', or ',' as pointer or reference marker. Now, all '*'s and '&'s preceding ')', '>', or ',' are marked as pointer / reference markers. Fixes PR14884. Since only the last '*' in 'int ***' was marked as pointer before (the rest were unary operators, which don't reach spaceRequiredBetween()), spaceRequiredBetween() now had to be thought about handing multiple '*'s in sequence. Before: return sizeof(int * *); Type **A = static_cast<Type * *>(P); Now: return sizeof(int**); Type **A = static_cast<Type **>(P); While here, also make all methods of AnnotatingParser except parseLine() private. Review URL: http://llvm-reviews.chandlerc.com/D384 llvm-svn: 174975
* Adding more overloads for allOf matcherEdwin Vane2013-02-122-6/+43
| | | | | | | | Adding overloads of allOf accepting 4 and 5 arguments. Reviewer: klimek llvm-svn: 174967
* Rename -constructors test to just -structors as in fact it tests dtors too. ↵Timur Iskhodzhanov2013-02-121-1/+1
| | | | | | Also, fix a minor typo in the test. llvm-svn: 174966
* Attempt to fix this test on i686 targets.Nick Lewycky2013-02-121-1/+1
| | | | llvm-svn: 174953
* The meat of this patch is in BuildCXXMemberCalLExpr where we make it useNick Lewycky2013-02-128-14/+68
| | | | | | | | | | | | MarkMemberReferenced instead of marking functions referenced directly. An audit of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few other changes: * don't mark functions odr-used when considering them for an initialization sequence. Do mark them referenced though. * the function nominated by the cleanup attribute should be diagnosed. * operator new/delete should be diagnosed when building a 'new' expression. llvm-svn: 174951
* Properly assemble PHIs after a null-checked invoke of objc_msgSend.John McCall2013-02-123-58/+135
| | | | | | rdar://12046763 llvm-svn: 174946
* Fix a bug reduced from a crash when trying to use modules with libc++. We checkRichard Smith2013-02-126-4/+32
| | | | | | | | the linkage of functions and variables while merging declarations from modules, and we don't necessarily have enough of the rest of the AST loaded at that point to allow us to compute linkage, so serialize it instead. llvm-svn: 174943
* + specified progress informationAnton Yartsev2013-02-121-1/+1
| | | | llvm-svn: 174942
* + centered progress cellsAnton Yartsev2013-02-122-87/+97
| | | | | | + added progress information for several checkers llvm-svn: 174941
* Call __cxa_begin_catch with the current exception beforeJohn McCall2013-02-125-11/+86
| | | | | | calling std::terminate(). rdar://11904428 llvm-svn: 174940
* Change some CGF parameters to CGMs.John McCall2013-02-121-49/+49
| | | | llvm-svn: 174939
* Remove an assert which triggers when a decl context in a module hits the 'hasRichard Smith2013-02-124-2/+23
| | | | | | | | | lexical storage but not visible storage' case in C++. It's unclear whether we even need the special-case handling for C++, since it seems to be working around our not serializing a lookup table for the TU in C. But in any case, the assertion is incorrect. llvm-svn: 174931
* Perform placeholder conversions on the controller of a _GenericJohn McCall2013-02-122-0/+23
| | | | | | expression. llvm-svn: 174930
* Diagnose loads of 'half' l-values in OpenCL.John McCall2013-02-125-41/+24
| | | | | | Patch by Joey Gouly! llvm-svn: 174928
* Backing out r174919 while I investigate a self-host bug on Takumi's builder.Lang Hames2013-02-126-367/+11
| | | | llvm-svn: 174925
* In ARC, emit non-peepholed +1s within the full-expression insteadJohn McCall2013-02-122-17/+58
| | | | | | of immediately afterwards. llvm-svn: 174922
* Split a couple of tests out into their own file.John McCall2013-02-122-93/+95
| | | | llvm-svn: 174921
* When generating IR for default copy-constructors, copy-assignment operators,Lang Hames2013-02-116-11/+367
| | | | | | | | | | | | | | | | | | | | move-constructors and move-assignment operators, use memcpy to copy adjacent POD members. Previously, classes with one or more Non-POD members would fall back on element-wise copies for all members, including POD members. This often generated a lot of IR. Without padding metadata, it wasn't often possible for the LLVM optimizers to turn the element-wise copies into a memcpy. This code hasn't yet received any serious tuning. I didn't see any serious regressions on a self-hosted clang build, or any of the nightly tests, but I think it's important to get this out in the wild to get more testing. Insights, feedback and comments welcome. Many thanks to David Blaikie, Richard Smith, and especially John McCall for their help and feedback on this work. llvm-svn: 174919
* Timing data was removed years ago. Remove these links.Tanya Lattner2013-02-111-10/+0
| | | | llvm-svn: 174918
* Don't bother reconciling external visible decls against our current set ofRichard Smith2013-02-112-12/+6
| | | | | | declarations if we didn't have a lookup map when the external decls were added. llvm-svn: 174906
* objective-C modern translator: Fixes a mistranslationFariborz Jahanian2013-02-112-1/+29
| | | | | | | of @throw statement by finding location of the ';' correctly. // rdar://13186010 llvm-svn: 174898
* [Modules] Cope better with top-level declarations loaded after being ↵Douglas Gregor2013-02-117-3/+60
| | | | | | | | | | | | | | | | | | | | declared in the current translation unit <rdar://problem/13189985>. These two related tweaks to keep the information associated with a given identifier correct when the identifier has been given some top-level information (say, a top-level declaration) and more information is then loaded from a module. The first ensures that an identifier that was "interesting" before being loaded from an AST is considered to be different from its on-disk counterpart. Otherwise, we lose such changes when writing the current translation unit as a module. Second, teach the code that injects AST-loaded names into the identifier chain for name lookup to keep the most recent declaration, so that we don't end up confusing our declaration chains by having a different declaration in there. llvm-svn: 174895
* Formatter: Detect ObjC message expressions after 'in' in loopNico Weber2013-02-114-6/+26
| | | | | | | | | | | | | | | | Before: for (id foo in[self getStuffFor : bla]) { } Now: for (id foo in [self getStuffFor:bla]) { } "in" is treated as loop keyword if the line starts with "for", and as a regular identifier else. To check for "in", its IdentifierInfo is handed through a few layers. llvm-svn: 174889
* Get rid of manual debug output, now that the test runner supports it.Manuel Klimek2013-02-113-9/+0
| | | | | | You can run tests with -debug instead now. llvm-svn: 174880
* Fix invalid formatting with spaces before trailing comments.Daniel Jasper2013-02-114-9/+14
| | | | | | | | In google style, trailing comments are separated by two spaces. This patch fixes the counting of these spaces and prevents clang-format from creating a line with 81 columns. llvm-svn: 174879
* Fixes handling of empty lines in macros.Manuel Klimek2013-02-113-4/+26
| | | | | | | | | | | | | | Now correctly formats: #define A \ \ b; to #define A b; Added the state whether an unwrapped line is a macro to the debug output. llvm-svn: 174878
* Update test to not fail with attribute groups.Bill Wendling2013-02-111-2/+2
| | | | llvm-svn: 174866
* Fix formatting of overloaded operator definitions.Daniel Jasper2013-02-113-17/+20
| | | | | | | | | | | | Before: operatorvoid*(); operator vector< A< A>>(); After: operator void *(); operator vector<A<A> >(); llvm-svn: 174863
* Do not use VariadicDynCastAllOfMatcher where VariadicAllOfMatcher works.Manuel Klimek2013-02-111-4/+4
| | | | llvm-svn: 174862
* Formatter: Remove now-unneeded code for formatting ':'s in ObjC method decls.Nico Weber2013-02-101-21/+0
| | | | | | | The more general code for formatting ObjC method exprs does this and more, it's no longer necessary to special-case this. No behavior change. llvm-svn: 174843
* Formatter: Add a test for multi-line ObjC dict literals.Nico Weber2013-02-101-0/+3
| | | | | | | | | | | | | | | | | | | | As it turns out, this already works reasonably well. This example from http://clang.llvm.org/docs/ObjectiveCLiterals.html NSDictionary *dictionary = @{ @"name" : NSUserName(), @"date" : [NSDate date], @"processInfo" : [NSProcessInfo processInfo] }; is formatted like NSDictionary *dictionary = @{ @"name" : NSUserName(), @"date" : [NSDate date], @"processInfo" : [NSProcessInfo processInfo] }; There's already a FIXME in NestedStaticInitializers about supporting one initializer per line, which is really all that's missing here too. llvm-svn: 174842
* Formatter: Add another ObjC literal test.Nico Weber2013-02-101-0/+2
| | | | | | (From http://clang.llvm.org/docs/ObjectiveCLiterals.html.) llvm-svn: 174841
* Formatter: Initial support for ObjC dictionary literals.Nico Weber2013-02-102-3/+30
| | | | | | | | | | | | | | | | | | Before: @{ foo: bar } ; Now: @{ foo : bar }; parseBracedList() already does the right thing from an UnwrappedLineParser perspective, so check for "@{" in all loops that process constructs that can contain expressions and call parseBracedList() if found. llvm-svn: 174840
* Use -mno-implicit-float by default for kernel/kext code. <rdar://13177960>Bob Wilson2013-02-102-4/+18
| | | | | | | | | | | Apple's kernel engineers have been expecting this behavior even though we've never implemented it before, as far as I can tell. In recent months, clang has gotten better at using vector instructions to optimize memcpy-like operations, and that has exposed problems when vector/floating-point instructions are used in kexts that don't support that. This behavior also matches what Apple's GCC did for PowerPC targets. llvm-svn: 174838
* Delete an extra blank line.Bob Wilson2013-02-101-1/+0
| | | | llvm-svn: 174837
* Recognize -mno-implicit-float option for x86 as well as ARM. <rdar://13180731>Bob Wilson2013-02-102-2/+6
| | | | | | | | | For x86 targets, we've been using the -msoft-float option to control passing the no-implicit-float option to cc1. Since the -mno-implicit-float option is now accepted by the driver, this just makes it work for x86 the same as it does for ARM targets. llvm-svn: 174836
* Use static functions instead of an unnamed namespaceDmitri Gribenko2013-02-101-6/+8
| | | | llvm-svn: 174835
* Reformat formatter code. No functionality change.Nico Weber2013-02-101-10/+9
| | | | llvm-svn: 174823
* Formatter: Detect ObjC array literals.Nico Weber2013-02-103-6/+19
| | | | | | | | Use this to add a space after "@[" and before "]" for now. Later, I want to use this to format multi-line array literals nicer, too. llvm-svn: 174822
* objective-C: Fixes a bogus warning due to not settingFariborz Jahanian2013-02-105-7/+36
| | | | | | | | the "nonatomic" attribute in property redeclaration in class extension. Also, improved on diagnostics in this area while at it. // rdar://13156292 llvm-svn: 174821
* Formatter: Add test for default arguments.Nico Weber2013-02-091-0/+2
| | | | llvm-svn: 174816
* FileCheck'ize testsDmitri Gribenko2013-02-094-9/+16
| | | | llvm-svn: 174815
* FileCheck'ize a testDmitri Gribenko2013-02-091-1/+2
| | | | llvm-svn: 174814
OpenPOWER on IntegriCloud