summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-format: Fix ObjC literal indentation in Google style.Daniel Jasper2013-10-223-11/+26
| | | | | | | | | | | | | | | | | | | | | | Style guide demands a two-space indent. Before: NSArray *arguments = @[ kind == kUserTicket ? @"--user-store" : @"--system-store", @"--print-tickets", @"--productid", @"com.google.Chrome" ]; After: NSArray *arguments = @[ kind == kUserTicket ? @"--user-store" : @"--system-store", @"--print-tickets", @"--productid", @"com.google.Chrome" ]; llvm-svn: 193168
* clang-format: Improve formatting of ObjC array literals.Daniel Jasper2013-10-224-43/+64
| | | | | | | | | | | | | | | | | | Before: NSArray *arguments = @[ kind == kUserTicket ? @"--user-store" : @"--system-store", @"--print-tickets", @"--productid", @"com.google.Chrome" ]; After: NSArray *arguments = @[ kind == kUserTicket ? @"--user-store" : @"--system-store", @"--print-tickets", @"--productid", @"com.google.Chrome" ]; This fixes llvm.org/PR15231. llvm-svn: 193167
* Use early return. No functionality change.Rafael Espindola2013-10-221-10/+12
| | | | llvm-svn: 193166
* Drop the unneeded VBase field from MethodInfo in the VFTableBuilder classTimur Iskhodzhanov2013-10-221-12/+5
| | | | llvm-svn: 193164
* Revert "This patch causes clang to reject alias attributes that point to ↵Rafael Espindola2013-10-226-71/+3
| | | | | | | | | | | | | | | | undefined names. For example, with this patch we now reject" This reverts commit r193161. It broke void foo() __attribute__((alias("bar"))); void bar() {} void zed() __attribute__((alias("foo"))); Looks like we have to fix pr17639 first :-( llvm-svn: 193162
* This patch causes clang to reject alias attributes that point to undefinedRafael Espindola2013-10-226-3/+71
| | | | | | | | | | | | names. For example, with this patch we now reject void f1(void) __attribute__((alias("g1"))); This patch is implemented in CodeGen. It is quiet a bit simpler and more compatible with gcc than implementing it in Sema. The downside is that the errors only fire during -emit-llvm. llvm-svn: 193161
* Fix comment typoAlp Toker2013-10-221-1/+1
| | | | llvm-svn: 193154
* Remove incorrect assert.Manuel Klimek2013-10-222-1/+6
| | | | | | | | | | If we run into the second preprocessor branch chain, the first branch chain might have already set the maximum branch count on that level to something > 0. Fixes PR17645. llvm-svn: 193153
* Allow a header to be part of multiple modules.Daniel Jasper2013-10-2218-81/+166
| | | | | | | | | | | | | | | | | | | | This patch changes two things: a) Allow a header to be part of multiple modules. The reasoning is that in existing codebases that have a module-like build system, the same headers might be used in several build targets. Simple reasons might be that they defined different classes that are declared in the same header. Supporting a header as a part of multiple modules will make the transistion easier for those cases. A later step in clang can then determine whether the two modules are actually compatible and can be merged and error out appropriately. The later check is similar to what needs to be done for template specializations anyway. b) Allow modules to be stored in a directory tree separate from the headers they describe. Review: http://llvm-reviews.chandlerc.com/D1951 llvm-svn: 193151
* Sema: Do not allow template declarations inside local classesDavid Majnemer2013-10-228-230/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Enforce the rule in C++11 [temp.mem]p2 that local classes cannot have member templates. This fixes PR16947. N.B. C++14 has slightly different wording to afford generic lambdas declared inside of functions. Fun fact: Some formulations of local classes with member templates would cause clang to crash during Itanium mangling, such as the following: void outer_mem() { struct Inner { template <typename = void> struct InnerTemplateClass { static void itc_mem() {} }; }; Inner::InnerTemplateClass<>::itc_mem(); } Reviewers: eli.friedman, rsmith, doug.gregor, faisalv Reviewed By: doug.gregor CC: cfe-commits, ygao Differential Revision: http://llvm-reviews.chandlerc.com/D1866 llvm-svn: 193144
* Revert "Re-enable passing MS inline asm test."Reid Kleckner2013-10-211-0/+3
| | | | | | | | Microsoft inline asm crashes on the hexagon bot for unknown reasons. This reverts commit r193124. llvm-svn: 193128
* Re-enable passing MS inline asm test.Reid Kleckner2013-10-211-3/+0
| | | | llvm-svn: 193124
* Revert "Refactor DynTypedMatcher into a value type class, just like Matcher<T>."Reid Kleckner2013-10-2111-297/+321
| | | | | | | | | This reverts commit r193100. It was failing to compile with MSVC 2012 while instantiating llvm::Optional<DynTypedMatcher>. llvm-svn: 193123
* Updated and added to the Consumed documentation.Chris Wailes2013-10-211-11/+41
| | | | llvm-svn: 193120
* [AArch64] Add the constraint to NEON scalar mla/mls instructions.Chad Rosier2013-10-212-10/+10
| | | | llvm-svn: 193118
* Fix string assignment, David Blaikie suggestion.Yaron Keren2013-10-211-2/+6
| | | | llvm-svn: 193116
* Make this test pass -verify.Rafael Espindola2013-10-211-2/+2
| | | | | | | | | Instead of using not, just drop the fastcall attribute which was causing an warning: calling convention 'fastcall' ignored for this target llvm-svn: 193110
* Ignore -fstrength-reduce and -fno-strength-reduce.Rafael Espindola2013-10-212-0/+3
| | | | | | GCC does the same. llvm-svn: 193103
* Refactor DynTypedMatcher into a value type class, just like Matcher<T>.Samuel Benzaquen2013-10-2111-321/+297
| | | | | | | | | | | | | | | | Summary: Refactor DynTypedMatcher into a value type class, just like Matcher<T>. This simplifies its usage and removes the virtual hierarchy from Matcher<T>. It also enables planned changes to replace MatcherInteface<T>. Too many instantiaions of this class hierarchy has been causing Registry.cpp.o to bloat in size and number of symbols. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1661 llvm-svn: 193100
* Extend test to show an alias can be before a definition.Rafael Espindola2013-10-211-1/+2
| | | | llvm-svn: 193099
* Cleanup redundant include.Rafael Espindola2013-10-213-6/+1
| | | | | | Patch by Daniel Marjamäki. llvm-svn: 193093
* Driver: Various string-related cleanups.Benjamin Kramer2013-10-211-50/+45
| | | | | | Also fixes some funky formatting. llvm-svn: 193079
* [mips][msa] Fix definition of SLD instruction.Matheus Almeida2013-10-212-8/+8
| | | | | | | The second parameter of the SLD intrinsic is the number of columns (GPR) to slide left the source array. llvm-svn: 193076
* Set the default hardware division features for ARM cpus. Also set it as ↵Silviu Baranga2013-10-212-2/+143
| | | | | | default for A32 armv8. llvm-svn: 193075
* Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware ↵Silviu Baranga2013-10-216-0/+111
| | | | | | divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior. llvm-svn: 193074
* Fix to PR8880 (clang dies processing a for loop).Serge Pavlov2013-10-219-15/+187
| | | | | | | | | | | | | | | | Due to statement expressions supported as GCC extension, it is possible to put 'break' or 'continue' into a loop/switch statement but outside its body, for example: for ( ; ({ if (first) { first = 0; continue; } 0; }); ) Such usage must be diagnosed as an error, GCC rejects it. To recognize this and similar patterns the flags BreakScope and ContinueScope are temporarily turned off while parsing condition expression. Differential Revision: http://llvm-reviews.chandlerc.com/D1762 llvm-svn: 193073
* Fixes PR17617: Crash on joining short if statements.Manuel Klimek2013-10-212-0/+19
| | | | | | | | Now that we iterate on the formatting multiple times when we have chains of preprocessor branches, we need to correctly reset the token's previous and next pointer for the first / last token. llvm-svn: 193071
* Expose -fmodule-name and -fmodule-map-file as driver options.Daniel Jasper2013-10-213-7/+22
| | | | | Review: http://llvm-reviews.chandlerc.com/D1974 llvm-svn: 193069
* Lex: Don't restrict legal UCNs when preprocessing assemblyJustin Bogner2013-10-212-0/+7
| | | | | | | | | | | | | | | The C and C++ standards disallow using universal character names to refer to some characters, such as basic ascii and control characters, so we reject these sequences in the lexer. However, when the preprocessor isn't being used on C or C++, it doesn't make sense to apply these restrictions. Notably, accepting these characters avoids issues with unicode escapes when GHC uses the compiler as a preprocessor on haskell sources. Fixes rdar://problem/14742289 llvm-svn: 193067
* [-fms-extensions] __is_interface_class was miscategorizedDavid Majnemer2013-10-211-1/+1
| | | | | | | We claimed that the __is_interface_class keyword was KEYCXX even though the __interface keyword was KEYMS. llvm-svn: 193065
* Sema: Explain our deviation from the standard by referencing the, now open, ↵David Majnemer2013-10-211-0/+2
| | | | | | LWG issue. llvm-svn: 193062
* Be more precise when diagnosing 'inline' on global replacement functionsDavid Majnemer2013-10-212-2/+2
| | | | llvm-svn: 193061
* Implement function type checker for the undefined behavior sanitizer.Peter Collingbourne2013-10-2012-12/+122
| | | | | | | | | This uses function prefix data to store function type information at the function pointer. Differential Revision: http://llvm-reviews.chandlerc.com/D1338 llvm-svn: 193058
* Revert r193022 and r193048. They broke the ubsan test suite.Peter Collingbourne2013-10-202-27/+23
| | | | llvm-svn: 193057
* Switch attribute test line endings from CRLFAlp Toker2013-10-204-75/+75
| | | | | | The convention is LF unless specifically testing line endings. llvm-svn: 193056
* Fix crash in cleanup attr handlingAlp Toker2013-10-204-3/+19
| | | | | | | | | | | ResolveSingleFunctionTemplateSpecialization() returns 0 and doesn't emit diags unless the expression has template-ids, so we must null check the result. Also add a better diag noting which overloads are causing the problem. Reviewed by Aaron Ballman. llvm-svn: 193055
* clang-format: Better understand Lambda poarameters.Daniel Jasper2013-10-202-1/+9
| | | | | | | | | | | | Before: auto PointerBinding = [](const char * S) {}; After: auto PointerBinding = [](const char *S) {}; This fixes llvm.org/PR17618. llvm-svn: 193054
* clang-format: Fix formatting of nested blocks after comment.Daniel Jasper2013-10-202-10/+17
| | | | | | | | | | | | | | | Before: DEBUG({ // Comment that used to confuse clang-format. fdafas(); }); Before: DEBUG({ // Comments are now fine. fdafas(); }); This fixed llvm.org/PR17619. llvm-svn: 193051
* clang-format: Support case ranges.Daniel Jasper2013-10-202-1/+9
| | | | | | | | | | | | | | | | | | | Before (note the missing space before "..." which can lead to compile errors): switch (x) { case 'A'... 'Z': case 1... 5: break; } After: switch (x) { case 'A' ... 'Z': case 1 ... 5: break; } llvm-svn: 193050
* clang-format: Improve formatting of ObjC dict literals.Daniel Jasper2013-10-202-8/+18
| | | | | | | | | | | | | | | | Before: NSDictionary *d = @{ @"nam" : NSUserNam(), @"dte" : [NSDate date], @"processInfo" : [NSProcessInfo processInfo] }; After: NSDictionary *d = @{ @"nam" : NSUserNam(), @"dte" : [NSDate date], @"processInfo" : [NSProcessInfo processInfo] }; llvm-svn: 193049
* Driver: libubsan_cxx depends on libubsan. Preserve the topological ordering, ↵Benjamin Kramer2013-10-202-4/+5
| | | | | | some linkers depend on it. llvm-svn: 193048
* Forgot some references to misspelled enums.Benjamin Kramer2013-10-201-4/+4
| | | | llvm-svn: 193047
* Miscellaneous speling fixes.Benjamin Kramer2013-10-2013-18/+18
| | | | llvm-svn: 193046
* Sema: Diagnose global replacement functions declared as inlineDavid Majnemer2013-10-203-0/+11
| | | | | | | | | | | This fixes PR17591. N.B. This actually goes beyond what the standard mandates by requiring the restriction to hold for declarations instead of definitions. This is believed to be a defect in the standard and an LWG issue has been submitted. llvm-svn: 193044
* Add a missing getMostRecentDecl to ClassTemplateDecl.Rafael Espindola2013-10-191-0/+8
| | | | llvm-svn: 193040
* Simplify some implementations of get*Decl.Rafael Espindola2013-10-197-33/+45
| | | | | | | | | | * NamedDecl and CXXMethodDecl were missing getMostRecentDecl. * The const version can just forward to the non const. * getMostRecentDecl can use cast instead of cast_or_null. This then removes some casts from the callers. llvm-svn: 193039
* This should use the possessive adjective.Rafael Espindola2013-10-192-2/+2
| | | | | | Thanks to David Blaikie for noticing it. llvm-svn: 193037
* Comment improvement.Rafael Espindola2013-10-192-2/+2
| | | | | | Thanks to Sean Silva for the suggestion. llvm-svn: 193036
* Add irreader to the component list, because ParseIR is called.Bill Wendling2013-10-191-2/+2
| | | | llvm-svn: 193032
* Reduce indentation with an early exit.Rafael Espindola2013-10-191-23/+24
| | | | llvm-svn: 193028
OpenPOWER on IntegriCloud