summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* implement the microsoft/gnu "__COUNTER__" macro: rdar://4329310Chris Lattner2009-04-1310-8/+63
| | | | llvm-svn: 68933
* Improve error recovery for calls, fixing:Chris Lattner2009-04-132-4/+16
| | | | | | PR3972: Poor diagnostic with missing ')' llvm-svn: 68932
* fix PR3932: [ObjC]Type defined as 'id' is not recognized as a valid object type.Chris Lattner2009-04-122-12/+27
| | | | | | by making ASTContext::isObjCObjectPointerType accept typedefs of id. llvm-svn: 68931
* rename testChris Lattner2009-04-121-0/+0
| | | | llvm-svn: 68930
* fix PR3965:SIGINT handler not restored after calling ParseAST(),Chris Lattner2009-04-121-1/+2
| | | | | | patch by Alexei Svitkine! llvm-svn: 68929
* add some more coverage.Chris Lattner2009-04-121-1/+6
| | | | llvm-svn: 68928
* clean up test.Chris Lattner2009-04-121-2/+1
| | | | llvm-svn: 68927
* rename testChris Lattner2009-04-121-0/+0
| | | | llvm-svn: 68926
* if we already know that a decl is invalid in an @catch, don't verify its type.Chris Lattner2009-04-122-3/+6
| | | | llvm-svn: 68925
* In X86DAGToDAGISel::MatchWrapper, if base or index are set, avoid matchingRafael Espindola2009-04-123-7/+25
| | | | | | only if symbolic addresses are RIP relatives. llvm-svn: 68924
* fix some out of date comments pointed out by SebastianChris Lattner2009-04-122-4/+2
| | | | llvm-svn: 68923
* Use a hashtable for TargetRegisterClass::contains.Owen Anderson2009-04-121-4/+7
| | | | llvm-svn: 68922
* fix a comment typo Sebastian noticed.Chris Lattner2009-04-121-1/+1
| | | | llvm-svn: 68921
* add support for handling C++'0x unified initializer syntaxChris Lattner2009-04-121-2/+2
| | | | | | to isValidAfterIdentifierInDeclarator, as suggested by Sebastian. llvm-svn: 68920
* Fix some C++ error recovery problems in init declarator parsingChris Lattner2009-04-123-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 68919
* fix another case that assumed that GetTypeForDeclarator would never return null.Chris Lattner2009-04-122-5/+5
| | | | llvm-svn: 68918
* mark the declspec as invalid when we recover instead of forcing to int,Chris Lattner2009-04-122-5/+7
| | | | | | this allows downstream diags to be properly silenced. llvm-svn: 68917
* fix code that incorrectly assumed that GetTypeForDeclarator cannotChris Lattner2009-04-121-2/+4
| | | | | | return null. llvm-svn: 68916
* refactor some code into X86DAGToDAGISel::MatchWrapperRafael Espindola2009-04-121-44/+51
| | | | llvm-svn: 68915
* Diagnose invalid uses of tagged types with a missing tag. For example, in:Chris Lattner2009-04-128-38/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 68914
* fix a valgrind problem I noticed while developing another patch,Chris Lattner2009-04-122-1/+5
| | | | | | | 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. llvm-svn: 68913
* Add Kaleidoscope to examples/ so that it gets built regularly and we'll noticeNick Lewycky2009-04-125-1/+1159
| | | | | | | if an API change causes it to be out of date. The code is copied out of LangImpl7.html. llvm-svn: 68912
* Implement the first set of changes for PR3963 and rdar://6759604,Chris Lattner2009-04-126-13/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 68911
* Fix compile error. Pointed out by mait on #llvm IRC!Nick Lewycky2009-04-122-2/+2
| | | | llvm-svn: 68910
* add a new isNull() method to DeclGroupRef.Chris Lattner2009-04-122-2/+4
| | | | llvm-svn: 68909
* a few cleanups to StatementCreatesScope: unnest the whole thing,Chris Lattner2009-04-121-12/+15
| | | | | | | exit at the first decl found that creates a scope, don't evaluate decl_end() every iteration. llvm-svn: 68908
* add a new Decl::hasAttr<T>() predicate.Chris Lattner2009-04-121-0/+4
| | | | llvm-svn: 68907
* "There was a typo in my previous patch which leads to miscompilation ofChris Lattner2009-04-121-1/+1
| | | | | | | | | | | | | | strncat :( strncat(foo, "bar", 99) would be optimized to memcpy(foo+strlen(foo), "bar", 100, 1) instead of memcpy(foo+strlen(foo), "bar", 4, 1)" Patch by Benjamin Kramer! llvm-svn: 68905
* OS dependent code removed.Fariborz Jahanian2009-04-121-4/+0
| | | | llvm-svn: 68904
* Add deleted functions and rvalue references to C++ status.Sebastian Redl2009-04-122-1/+20
| | | | llvm-svn: 68903
* Parse deleted member functions. Parsing member declarations goes through a ↵Sebastian Redl2009-04-129-49/+193
| | | | | | | | | 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. llvm-svn: 68902
* Add tests for the parts of X86-64 TLS that are already implemented.Rafael Espindola2009-04-124-0/+12
| | | | llvm-svn: 68901
* rename testChris Lattner2009-04-121-0/+0
| | | | llvm-svn: 68900
* Fix rdar://6770142 - Class and qualified id's are compatible, just likeChris Lattner2009-04-124-7/+24
| | | | | | Class and unqualified id's are. llvm-svn: 68899
* rename testChris Lattner2009-04-121-0/+0
| | | | llvm-svn: 68898
* merge protocol-test-1.m -> protocol-test-2.mChris Lattner2009-04-122-22/+16
| | | | llvm-svn: 68897
* Merge forward-circular into protocol-test-2Chris Lattner2009-04-122-10/+11
| | | | llvm-svn: 68896
* this test is subsumed by protocol-test-2.mChris Lattner2009-04-121-46/+0
| | | | llvm-svn: 68895
* Fix rdar://6771034: don't warn on use of forward declared protocol in protocolChris Lattner2009-04-127-10/+17
| | | | | | | list of another protocol definition. This warning is very noisy and GCC doesn't produce it so existing code doesn't expect it. llvm-svn: 68894
* fix typo in test name.Chris Lattner2009-04-121-0/+0
| | | | llvm-svn: 68893
* call objc interfaces just "interfaces" in diagnostics, not "Objective-C types"Chris Lattner2009-04-124-17/+19
| | | | | | or "Objective-C interface types" etc. llvm-svn: 68892
* implement rdar://6780761, making sema reject some code that otherwiseChris Lattner2009-04-126-19/+41
| | | | | | crashes codegen. llvm-svn: 68891
* fix a cross-block fastisel crash handling overflow intrinsics.Chris Lattner2009-04-122-5/+37
| | | | | | See comment for details. This fixes rdar://6772169 llvm-svn: 68890
* make UpdateValueMap handle the possiblity that we could beChris Lattner2009-04-121-1/+1
| | | | | | copying into the right register, avoiding a copy. llvm-svn: 68889
* optimize FastISel::UpdateValueMap to avoid duplicate map lookups,Chris Lattner2009-04-122-8/+13
| | | | | | and make it return the assigned register. llvm-svn: 68888
* simplify code by using IntrinsicInst.Chris Lattner2009-04-121-69/+54
| | | | llvm-svn: 68887
* Add new TargetInstrDesc::hasImplicitUseOfPhysReg andChris Lattner2009-04-122-15/+21
| | | | | | | hasImplicitDefOfPhysReg methods. Use them to remove a look in X86 fast isel. llvm-svn: 68886
* add some optimizations for strncpy/strncat and factor someChris Lattner2009-04-123-22/+166
| | | | | | code. Patch by Benjamin Kramer! llvm-svn: 68885
* Implement support for GCC's -dD mode, which dumps -E output *and*Chris Lattner2009-04-124-54/+81
| | | | | | macro definitions. llvm-svn: 68884
* add a ppcallback hook for macro definitions.Chris Lattner2009-04-122-2/+11
| | | | llvm-svn: 68883
OpenPOWER on IntegriCloud