summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Produce errors for unknown options.Rafael Espindola2013-09-231-0/+5
| | | | | | | | | This doesn't change a lot since clang still thinks it knows all of the -f*, -m* and -W* options for example. Other than the options clang explicitly claims to know, this fixes pr9701. llvm-svn: 191249
* Fix argument types of some AVX2 intrinsics.Eli Friedman2013-09-231-8/+8
| | | | | | | | This fix makes our headers consistent with gcc. PR17312. llvm-svn: 191248
* Remove extra space.Fariborz Jahanian2013-09-231-1/+1
| | | | llvm-svn: 191246
* Add _mm_stream_si64 intrinsic.Eli Friedman2013-09-232-2/+20
| | | | | | | | | While I'm here, also fix the alignment computation for the whole family of intrinsics. PR17298. llvm-svn: 191243
* ObjectiveC migrator. When migrating to property declarationFariborz Jahanian2013-09-231-1/+3
| | | | | | | use Cocoa's naming convention for properties of ObjC object type. // rdar://15045005 llvm-svn: 191240
* Revert change accidentally committed in r191150.Richard Smith2013-09-231-3/+1
| | | | llvm-svn: 191237
* ObjectiveC migrator: Infer NS_OPTIONS when if there is atFariborz Jahanian2013-09-231-3/+7
| | | | | | | | least one hex enumerator, all others are also hex enumerator (0 enumerator is excepted). // rdar://15044304 llvm-svn: 191222
* Enable -fsanitize=use-after-return by default under -fsanitize=addressKostya Serebryany2013-09-231-3/+3
| | | | | | | | | | | | | | | | | | | | | Summary: We enable ASAN's use-after-return instrumentation at compile-time, but still keep it disabled at run-time. This enables the users to flip the flag at run-time using environment variable ASAN_OPTIONS=detect_stack_use_after_return=1 instead of using a separate build. If UAR detection is disabled at run-time, this extra compile-time instrumentation costs very small slowdown. On SPEC 2006 14 tests are not affected at all, 4 tests get ~ 1% slowdown and 453.povray gets 4%. Reviewers: samsonov Reviewed By: samsonov CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1741 llvm-svn: 191186
* PR16529: Don't forget to add the CXXFunctionalCastExpr type sugar to anRichard Smith2013-09-231-8/+11
| | | | | | | InitListExpr for a C++11-style T{...} construction, if initialization registered a destructor for it. llvm-svn: 191182
* Make sort predicate match the qsort convention.Benjamin Kramer2013-09-221-1/+5
| | | | llvm-svn: 191177
* Fix array_pod_sort predicates after LLVM change.Benjamin Kramer2013-09-224-16/+11
| | | | llvm-svn: 191176
* array_pod_sort loses some type safety, better use the right types.Benjamin Kramer2013-09-221-2/+2
| | | | llvm-svn: 191174
* Rewrite a cold use of std::sort to array_pod_sort.Benjamin Kramer2013-09-221-12/+16
| | | | | | No functionality change. llvm-svn: 191173
* Fix comment to match name of variable.Nick Lewycky2013-09-221-1/+1
| | | | llvm-svn: 191171
* Simplify code to equivalent code. No need to test for null after cast<>, useNick Lewycky2013-09-221-9/+5
| | | | | | | takeAs<> instead of cast<>(.take()). Fix 80-column violation in whitespace after comment. llvm-svn: 191170
* Fix typo. Add missing whitespace. No functionality change.Nick Lewycky2013-09-221-2/+2
| | | | llvm-svn: 191169
* Parse: Move simple-type-specifier sanity check earlierDavid Majnemer2013-09-221-4/+5
| | | | | | No functional change, just makes the error handling a bit more obvious. llvm-svn: 191162
* Parse: Don't crash during parsing if we lack a simple-type-specifierDavid Majnemer2013-09-222-0/+6
| | | | | | | | | | | | | | | | | Summary: Parsing cast expressions during error recovery can put us in a bad state. Check to see if the token for a simple-type-specifier makes sense before further parsing. Fixes PR17255. Reviewers: rsmith, doug.gregor, CornedBee, eli.friedman CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1696 llvm-svn: 191159
* ObjectiveC: ObjC declarations, including forward classFariborz Jahanian2013-09-221-0/+12
| | | | | | and protocols can be at global scope only. llvm-svn: 191155
* PR17295: Do not allow explicit conversion functions to be used in cases whereRichard Smith2013-09-213-1/+49
| | | | | | | | | | an additional conversion (other than a qualification conversion) would be required after the explicit conversion. Conversely, do allow explicit conversion functions to be used when initializing a temporary for a reference binding in direct-list-initialization. llvm-svn: 191150
* Some comment updates and tweaks for clarity.Richard Smith2013-09-211-21/+28
| | | | llvm-svn: 191147
* Rearrange narrowing checks in initialization to be a different form of stepRichard Smith2013-09-211-35/+40
| | | | | | | | rather than a post-processing action, so we can support inserting these checks at stages other than the end of the initialization. No functionality change intended. llvm-svn: 191146
* clang-format: Improve address-of-operator detectionDaniel Jasper2013-09-211-1/+1
| | | | | | | | | | Before: size = sizeof * a; After: size = sizeof *a; llvm-svn: 191139
* [Mips] Allocate NaClTargetInfo for MIPSEL NaClPetar Jovanovic2013-09-211-0/+2
| | | | | | | | A patch to AllocateTarget function to recognize llvm::Triple::NaCl for MIPSEL and return NaClTargetInfo. Additional test has been added to check if the expected macros get defined. llvm-svn: 191124
* Fix return type of _mm_extract_epi8 etc.Eli Friedman2013-09-211-2/+3
| | | | | | PR17300. llvm-svn: 191120
* Refactor: CheckExplicitInitList is only called to check an entire InitListExpr,Richard Smith2013-09-201-15/+20
| | | | | | | so the Index in/out parameters are pointless (always passed in as 0, always ignored by the caller). llvm-svn: 191103
* clang-cl: implement custom search for cl.exe in /fallback modeHans Wennborg2013-09-201-4/+39
| | | | | | | | | | This solves the problem of fallback onto ourselves if clang-cl has been renamed to cl.exe and put on the PATH, as happens with the VS integration. Differential Revision: http://llvm-reviews.chandlerc.com/D1731 llvm-svn: 191099
* Use -fms-compatibility to trigger lookup into dep. basesReid Kleckner2013-09-201-2/+2
| | | | | | | Update the docs for -fms-extensions and -fms-compatibility to try to clarify the difference between the two. llvm-svn: 191095
* [analyzer] Use getParentIgnoreParenCasts instead of doing it by hand.Jordan Rose2013-09-201-3/+1
| | | | | | | | | | | | Apart from being more compact and already implemented, this also handles the case where the parent is null. (It does also ignore all casts, not just implicit ones, but this is more efficient to test and in the case we care about---a message in a PseudoObjectExpr---there should only be implicit casts anyway. This should fix our internal buildbot. llvm-svn: 191094
* [ASan] Do not imply -undefined dynamic_lookup when linking dylibs with ↵Alexander Potapenko2013-09-202-20/+4
| | | | | | | | | | -fsanitize=address. Instead add the ASan runtime to the linker command line so that only the ASan API functions can be undefined in the target library. Fixes http://llvm.org/bugs/show_bug.cgi?id=17275 llvm-svn: 191076
* Modify the uninitialized field visitor to detect uninitialized use across theRichard Trieu2013-09-201-32/+180
| | | | | | | | | | | | | | | | | | fields in the class. This allows a better checking of member intiailizers and in class initializers in regards to initialization ordering. For instance, this code will now produce warnings: class A { int x; int y; A() : x(y) {} // y is initialized after x, warn here A(int): y(x) {} // default initialization of leaves x uninitialized, warn here }; Several test cases were updated with -Wno-uninitialized to silence this warning. llvm-svn: 191068
* Switch the semantic DeclContext for a block-scope declaration of a function orRichard Smith2013-09-208-74/+211
| | | | | | | | | | | | | | variable from being the function to being the enclosing namespace scope (in C++) or the TU (in C). This allows us to fix a selection of related issues where we would build incorrect redeclaration chains for such declarations, and fail to notice type mismatches. Such declarations are put into a new IdentifierNamespace, IDNS_LocalExtern, which is only found when searching scopes, and not found when searching DeclContexts. Such a declaration is only made visible in its DeclContext if there are no non-LocalExtern declarations. llvm-svn: 191064
* PR17290: Use 'false' macro in fix-it hint for initializing a variable of typeRichard Smith2013-09-204-19/+29
| | | | | | | | | _Bool in C, if the macro is defined. Also teach FixItUtils to look at whether the macro was defined at the source location for which it is creating a fixit, rather than looking at whether it's defined *now*. This is especially relevant for analysis-based warnings which are delayed until end of TU. llvm-svn: 191057
* Don't correct typos in Sema::BuildCXXNestedNameSpecifier with -fms-extensionsKaelyn Uhrain2013-09-191-1/+1
| | | | | | | | When -fms-extensions is enabled, the typo correction was being called here on non-error paths (as in test/SemaTemplate/lookup-dependent-bases.cpp) and correct compilation depended on Sema::CorrectTypo not finding a viable candidate. llvm-svn: 191046
* clang-cl: implement /fallback modeHans Wennborg2013-09-193-2/+136
| | | | | | | | | | | | | When this flag is enabled, clang-cl falls back to cl.exe if it cannot compile the code itself for some reason. The idea is to use this to help build projects that almost compile with clang-cl, except for some files that can then be built with the fallback mechanism. Differential Revision: http://llvm-reviews.chandlerc.com/D1711 llvm-svn: 191034
* Fixes a buildbot failure (was using localFariborz Jahanian2013-09-191-4/+2
| | | | | | type in template instantiation). llvm-svn: 191022
* Refinement to my previous patch forFariborz Jahanian2013-09-191-1/+7
| | | | | | objc_returns_inner_pointer on properties. // rdar://14990439 llvm-svn: 191016
* ObjectiveC: Allow NS_RETURNS_INNER_POINTER annotation Fariborz Jahanian2013-09-192-12/+22
| | | | | | | | | | of ObjectiveC properties to mean annotation of NS_RETURNS_INNER_POINTER on its synthesized getter. This also facilitates more migration to properties when methods are annotated with NS_RETURNS_INNER_POINTER. // rdar://14990439 llvm-svn: 191009
* Fix ifdef macro missed in previous commitBen Langmuir2013-09-191-1/+1
| | | | llvm-svn: 191003
* Move sha intrinsics to immintrin.hBen Langmuir2013-09-193-5/+5
| | | | | | This is consistent with ICC and Intel's SHA-enabled GCC version. llvm-svn: 191002
* [ARMv8] Add crypto-neon-fp-armv8 -mfpu option in driver.Amara Emerson2013-09-191-0/+3
| | | | llvm-svn: 191001
* Add C intrinsics for Intel SHA ExtensionsBen Langmuir2013-09-194-2/+95
| | | | | | | | | Intrinsics added shaintrin.h, which is included from x86intrin.h if __SHA__ is enabled. SHA implies SSE2, which is needed for the __m128i type. Also add the -msha/-mno-sha option. llvm-svn: 190999
* Fix use-after-free in r190980.Eli Friedman2013-09-191-3/+6
| | | | llvm-svn: 190984
* Use curly braces all the way through long if/else chain for consistency and ↵Craig Topper2013-09-191-14/+14
| | | | | | readability. llvm-svn: 190982
* Fix crash with cast of value-dependent expr.Eli Friedman2013-09-191-2/+5
| | | | | | | | | We don't really need to perform semantic analysis on the dependent expression anyway, so just call the cast dependent. <rdar://problem/15012610> llvm-svn: 190981
* Make Preprocessor::Lex non-recursive.Eli Friedman2013-09-198-152/+248
| | | | | | | | | | | | | | | Before this patch, Lex() would recurse whenever the current lexer changed (e.g. upon entry into a macro). This patch turns the recursion into a loop: the various lex routines now don't return a token when the current lexer changes, and at the top level Preprocessor::Lex() now loops until it finds a token. Normally, the recursion wouldn't end up being very deep, but the recursion depth can explode in edge cases like a bunch of consecutive macros which expand to nothing (like in the testcase test/Preprocessor/macro_expand_empty.c in this patch). <rdar://problem/14569770> llvm-svn: 190980
* Fix ifdef ordering at the end of Intrin.h from r190965Reid Kleckner2013-09-191-3/+5
| | | | | | Test that intrin.h at least parses in C++ TUs. llvm-svn: 190978
* Disabling sse2 should disable aes and pclmul support.Craig Topper2013-09-191-1/+1
| | | | llvm-svn: 190977
* Fix CharByteWidth assertion in LiteralSupport.Eli Friedman2013-09-181-1/+1
| | | | | | Patch by Eelis van der Weegen. llvm-svn: 190971
* Remove a bogus diagnostic preventing static data member templates from beingRichard Smith2013-09-182-20/+0
| | | | | | defined with no initializer. llvm-svn: 190970
OpenPOWER on IntegriCloud