aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-04-13Reapply 68936, turned out to that clang's better debug info exposed aDaniel Dunbar
codegenerator bug. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68983 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Move/update recent FIXME (wrt UTF-8 checking for ObjC @-strings).Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13upgrade "extra tokens at end of directive" to warn by default.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68980 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13In objc2's None-Fragile ABI, one cannot use the super class ivar forFariborz Jahanian
setter/getter synthesis. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68976 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Fixed crasher in <rdar://problem/6780904> [irgen] Assertion failed: (Result ↵Steve Naroff
== conversionOK && "UTF-8 to UTF-16 conversion failed"), function GetAddrOfConstantCFString, file CodeGenModule.cpp, line 1063. Still a diagnostic related FIXME (will discuss with Daniel/Fariborz offline). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68975 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Add PCH support for enumerations and enumerators.Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68974 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Revert 68936, LLVM still isn't ready to handle debug info + optimization.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68972 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Use the new guard variable mangling function and get rid of the old code.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68971 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Add support for mangling guard variables.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68969 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Change diagnostic as a result of researching <rdar://problem/6779809> ↵Steve Naroff
missing interface name in "error: cannot declare variable inside a class, protocol or category ''. Since ObjC 2.0 class "extensions" have a null name, the diagnostic above is actually "correct". Nevertheless, it is confusing. Decided to remove the name entirely (from my perspective, it didn't add any value). Also simplified the text of the diagnostic a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68967 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Fix assertion failure in PTH when tokens followed a closing #endif.Daniel Dunbar
- Ted, please check. - Missing test case because PTH won't reliably cache the tokens in a test case. *cough* git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68966 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Make the reading of the line table from a PCH file more robust againstDouglas Gregor
the unlikely event that the filename IDs in the stored line table end up being different from the filename IDs in the newly-created line table. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68965 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Include the SourceManager's line table in the PCH file. We can nowDouglas Gregor
properly cope with #line directives in PCH files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68963 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Factor the internals of SourceManager (specially, LineTableInfo) into a ↵Douglas Gregor
separate Internals header. No functionality change git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Make the selection of type declarations in Sema::getTypeNameDouglas Gregor
deterministic when faced with an ambiguity. This eliminates the annoying test/SemaCXX/using-directive.cpp failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68952 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13the driver caught up. This makes -msse3 correctly set __SSE3__ etc.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68943 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13fix rdar://6774906, a crash handling implicit conversions between pointersChris Lattner
in different address spaces. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68941 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Enable debug info generation while optimizing.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68936 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13mention the non-standard builtin macros we support.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68935 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68933 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13Improve error recovery for calls, fixing:Chris Lattner
PR3972: Poor diagnostic with missing ')' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68932 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12fix PR3932: [ObjC]Type defined as 'id' is not recognized as a valid object type.Chris Lattner
by making ASTContext::isObjCObjectPointerType accept typedefs of id. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68931 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12rename testChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68930 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12add some more coverage.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68928 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12clean up test.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12rename testChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68926 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12if we already know that a decl is invalid in an @catch, don't verify its type.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68925 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12fix some out of date comments pointed out by SebastianChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68923 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12fix a comment typo Sebastian noticed.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68921 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12add support for handling C++'0x unified initializer syntaxChris Lattner
to isValidAfterIdentifierInDeclarator, as suggested by Sebastian. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68920 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12Fix some C++ error recovery problems in init declarator parsingChris Lattner
that I noticed working on other things. Instead of emitting: t2.cc:1:8: error: use of undeclared identifier 'g' int x(*g); ^ t2.cc:1:10: error: expected ')' int x(*g); ^ t2.cc:1:6: note: to match this '(' int x(*g); ^ We now only emit: t2.cc:1:7: warning: type specifier missing, defaults to 'int' int x(*g); ^ Note that the example in SemaCXX/nested-name-spec.cpp:f4 is still not great, we now produce both of: void f4(undef::C); // expected-error {{use of undeclared identifier 'undef'}} \ expected-error {{variable has incomplete type 'void'}} The second diagnostic should be silenced by something getting marked invalid. I don't plan to fix this though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12fix another case that assumed that GetTypeForDeclarator would never return null.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68918 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12mark the declspec as invalid when we recover instead of forcing to int,Chris Lattner
this allows downstream diags to be properly silenced. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68917 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12fix code that incorrectly assumed that GetTypeForDeclarator cannotChris Lattner
return null. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12Diagnose invalid uses of tagged types with a missing tag. For example, in:Chris Lattner
struct xyz { int y; }; enum abc { ZZZ }; static xyz b; abc c; we used to produce: t2.c:4:8: error: unknown type name 'xyz' static xyz b; ^ t2.c:5:1: error: unknown type name 'abc' abc c; ^ we now produce: t2.c:4:8: error: use of tagged type 'xyz' without 'struct' tag static xyz b; ^ struct t2.c:5:1: error: use of tagged type 'abc' without 'enum' tag abc c; ^ enum GCC produces the normal: t2.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘b’ t2.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’ rdar://6783347 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68914 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12fix a valgrind problem I noticed while developing another patch,Chris Lattner
if a decl is invalid, it isn't added to the Decls array, so we need to pass in Decls.size() to avoid reading uninit memory. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68913 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12Implement the first set of changes for PR3963 and rdar://6759604,Chris Lattner
which tries to do better error recovery when it is "obvious" that an identifier is a mis-typed typename. In this case, we try to parse it as a typename instead of as the identifier in a declarator, which gives us several options for better error recovery and immediately makes diagnostics more useful. For example, we now produce: t.c:4:8: error: unknown type name 'foo_t' static foo_t a = 4; ^ instead of: t.c:4:14: error: invalid token after top level declarator static foo_t a = 4; ^ Also, since we now parse "a" correctly, we make a decl for it, preventing later uses of 'a' from emitting things like: t.c:12:20: error: use of undeclared identifier 'a' int bar() { return a + b; } ^ I'd really appreciate any scrutiny possible on this, it is a tricky area. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68911 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12add a new isNull() method to DeclGroupRef.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68909 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12a few cleanups to StatementCreatesScope: unnest the whole thing,Chris Lattner
exit at the first decl found that creates a scope, don't evaluate decl_end() every iteration. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68908 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12add a new Decl::hasAttr<T>() predicate.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68907 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12OS dependent code removed.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68904 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12Add deleted functions and rvalue references to C++ status.Sebastian Redl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68903 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12Parse deleted member functions. Parsing member declarations goes through a ↵Sebastian Redl
different code path that I forgot previously. Implement the rvalue reference overload dance for returning local objects. Returning a local object first tries to find a move constructor now. The error message when no move constructor is defined (or is not applicable) and the copy constructor is deleted is quite ugly, though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68902 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12rename testChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12Fix rdar://6770142 - Class and qualified id's are compatible, just likeChris Lattner
Class and unqualified id's are. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68899 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12rename testChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68898 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12merge protocol-test-1.m -> protocol-test-2.mChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68897 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12Merge forward-circular into protocol-test-2Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12this test is subsumed by protocol-test-2.mChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68895 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12Fix rdar://6771034: don't warn on use of forward declared protocol in protocolChris Lattner
list of another protocol definition. This warning is very noisy and GCC doesn't produce it so existing code doesn't expect it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68894 91177308-0d34-0410-b5e6-96231b3b80d8