aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-01Add test cases for r155935.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155940 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Revert r155933Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155939 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Workaround a miscompile in 483.xalancbmk while we figure it out.David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155938 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01During block layout, after padding up to the max field alignment,John McCall
the alignment might actually exceed the max field alignment; don't assert in this case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155937 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Diagnostics should start with a lower-case letter.Patrick Beard
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155936 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01In C++11 mode, implement the C++11 semantics forDouglas Gregor
[basic.lookup.classref]p1 and p4, which concerns name lookup for nested-name-specifiers and template names, respectively, in a member access expression. C++98/03 forces us to look both in the scope of the object and in the current scope, then compare the results. C++11 just takes the result from the scope of the object, if something is found. Fixes <rdar://problem/11328502>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155935 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Fix CMake buildDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155933 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Test verified.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155932 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Spacing.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155931 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Implement simplify_type traits for redecl_iterator.David Blaikie
Based on Chandler Carruth's feedback on r155869. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155929 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Remove variables made dead by r155923David Blaikie
This makes Clang's build warning free again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155928 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Get rid of storelv4si builtin as it can be expressed directly. This is generalChad Rosier
goodness because it provides opportunites to cleanup things. For example, uint64_t t1(__m128i vA) { uint64_t Alo; _mm_storel_epi64((__m128i*)&Alo, vA); return Alo; } was generating movq %xmm0, -8(%rbp) movq -8(%rbp), %rax and now generates movd %xmm0, %rax rdar://11282581 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155924 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Remove dead code found by static analyzer.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155923 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Push variable declaration into nested scope (the only place where it is ↵Ted Kremenek
used). Found by static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155922 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01modern objective-c translation of private ivars.Fariborz Jahanian
// rdar://11351299 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155921 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Restructure some of the member-pointer tests, implicitlyJohn McCall
removing some that were added without a triple (and moving their tests into files that appropriately test multiple architectures). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155920 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Unify Options.td and CC1Options.td, in a first step towards unifying the ↵James Molloy
serialization logic in Frontend and Driver. Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155916 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Make some helper functions static.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155914 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01clang/test/CodeGenCXX: Fix two tests, destructors.cpp and ↵NAKAMURA Takumi
microsoft-abi-array-cookies.cpp, for -Asserts. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155913 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01clang/test/Rewriter: Remove XFAIL and add -U__declspec to other 9 tests. ↵NAKAMURA Takumi
mingw32 tends to define built-in __declspec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155911 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01clang/test/Rewriter/rewrite-modern-extern-c-func-decl.mm: Remove XFAIL and ↵NAKAMURA Takumi
add -U__declspec. mingw32 tends to define built-in __declspec. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155910 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Add a disclaimer to the new test, plus a user-declared ctorJohn McCall
to force the emission of vtordisps. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155906 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Add support for laying out vtordisps according to our currentJohn McCall
working knowledge of the Microsoft ABI. Based on a patch by Dmitry Sokolov. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155905 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Fix compilation with mingw-w64.Abramo Bagnara
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155904 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Enable AVX on AMD Bulldozer processors.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155900 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Abstract the emission of global destructors into ABI-specific codeJohn McCall
and only consider using __cxa_atexit in the Itanium logic. The default logic is to use atexit(). Emit "guarded" initializers in Microsoft mode unconditionally. This is definitely not correct, but it's closer to correct than just not emitting the initializer. Based on a patch by Timur Iskhodzhanov! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155894 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01PR12710 - broken default argument handling for templates.David Blaikie
I broke this in r155838 by not actually instantiating non-dependent default arg expressions. The motivation for that change was to avoid producing duplicate conversion warnings for such default args (we produce them once when we parse the template - there's no need to produce them at each instantiation) but without actually instantiating the default arg, things break in weird ways. Technically, I think we could still get the right diagnostic experience without the bugs if we instantiated the non-dependent args (for non-dependent params only) immediately, rather than lazily. But I'm not sure if such a refactoring/ change would be desirable so here's the conservative fix for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155893 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Place several uncovered warnings under warning flags, and tweak diagnostic ↵Ted Kremenek
output including the term "gc" (in lowercase). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155892 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Remove some not-very-stable assumptions from this testcase.John McCall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155889 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Teach RetainCountchecker about IORegistryEntrySearchCFProperty returning ↵Ted Kremenek
retained objects. I know there is an SDK enhancement request for this to have the cf_returns_retained annotation, so this is just a stop gap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Refactor the C++ ABI code a little bit to take advantage ofJohn McCall
what I'm going to treat as basically universal properties of array-cookie code. Implement MS array cookies on top of that. Based on a patch by Timur Iskhodzhanov! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155886 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Fix use of uninitialized variable caught by GCC's -Wmaybe-uninitialized.David Blaikie
Review by Doug Gregor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155880 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01When mangling a synthetic function declaration, we might not haveJohn McCall
type-source information for its parameters. Don't crash when mangling them in the MS C++ ABI. Patch by Timur Iskhodzhanov! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155879 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Revert r155874.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155878 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Remove the unused DestroyAttrs, noticed by Michael Han.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155877 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Turn the mixed-sign-comparison diagnostic into a runtime behaviorDouglas Gregor
diagnostic, from Eitan Adler! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155876 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Print inline for inline namespaces, from Faisal ValiDouglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155875 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Move a non portable test to FileCheck, from Jonathan Gray!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155874 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Move warn_cxx0x_right_shift_in_template_arg to CXX11Compat group, fromDouglas Gregor
Dmitri Gribenko! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155872 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Let's use the correct bool this time.Kaelyn Uhrain
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155871 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01A couple of very small tweaks suggested by Doug in reply to r155580 and r155163.Kaelyn Uhrain
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155870 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01Remove ref/value inconsistency in redecl_iterator.David Blaikie
Similar to r155808 - this mistake has been made in a few iterators. Based on Chandler Carruth's feedback to r155808 I added an implicit conversion to Decl* to ease adoption/usage. Useful for the pointer comparison, but not the dyn_cast (due to template argument deduction causing the conversion not to be used) - there for future convenience, though. This idiom (op T* for iterators) seems to be fairly idiomatic within the LLVM codebase & I'll likely add it as I fix up the other iterators here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155869 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01My first effort to do this more subtly failed, so elaboratelyJohn McCall
test for an invalid declaration at every single place in the constant evaluator that's about to request a struct layout. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155868 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01malloc size checker: Ignore const'ness of pointer types when determining of ↵Ted Kremenek
a sizeof() type is compatible with a pointed type. Fixes <rdar://problem/11292586>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155864 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-30Add support for openSUSE 12.2, from Ismail Donmez!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155860 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-30clang_getCursorLexicalParent should return a translation unit cursor for ↵Douglas Gregor
declarations at the global scope, from Evan P. Fixes PR9083. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155858 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-30Remove -Wc++98-compat warning for an outrageously-rare circumstance of 'this'Richard Smith
being used in an exception specification in a way which isn't otherwise ill-formed in C++98: this warning also incorrectly triggered on uses of 'this' inside thread-safety attributes, and the mechanism required to tell these cases apart is more complex than can be justified by the (minimal) value of this part of -Wc++98-compat. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155857 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-30When going through references to check if the function returns the addressArgyrios Kyrtzidis
of a local variable, make sure we don't infinitely recurse when the reference binds to itself. e.g: int* func() { int& i = i; // assign non-exist variable to a reference which has same name. return &i; // return pointer } rdar://11345441 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155856 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-30modern objective-c translator. named aggregate typesFariborz Jahanian
defined inside the objc class belong to class's decl. scope. This is to conform to objective-c rules. // rdar://11351299 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155855 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-30For RecursiveASTVisitor, do data recursion for CXXOperatorCallExpr.Argyrios Kyrtzidis
rdar://11289247 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155849 91177308-0d34-0410-b5e6-96231b3b80d8