summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* testing (reverted)Howard Hinnant2009-02-191-1/+1
| | | | llvm-svn: 64991
* testingHoward Hinnant2009-02-191-1/+1
| | | | llvm-svn: 64990
* Couple of helpers for objc's gc attributes.Fariborz Jahanian2009-02-191-1/+1
| | | | | | No change in functionality. llvm-svn: 64989
* Address Chris's comments regarding C++ name mangling.Douglas Gregor2009-02-187-45/+64
| | | | llvm-svn: 64984
* retain/release checker: Place the leak diagnostic after the last statement thatTed Kremenek2009-02-181-15/+37
| | | | | | references the tracked object. llvm-svn: 64980
* fariborz already fixed this.Chris Lattner2009-02-181-1/+0
| | | | llvm-svn: 64975
* Remove unused variable.Ted Kremenek2009-02-181-1/+0
| | | | llvm-svn: 64974
* Remove logic for computing 'display hint'.Ted Kremenek2009-02-181-21/+2
| | | | llvm-svn: 64973
* minor name changes, no functionality change.Chris Lattner2009-02-182-8/+8
| | | | llvm-svn: 64972
* More fun with retain checker diagnostics:Ted Kremenek2009-02-181-7/+17
| | | | | | | | - Fix some grammar. - Fix a bug where a "reference count incremented" diagnostic would not be shown if the previous typestate was "Released" (only happens in GC mode). llvm-svn: 64971
* fix some subtle bugs handling the mix of cvr qualifiers, addr spaces, Chris Lattner2009-02-181-34/+52
| | | | | | | and gc attrs. Add an assert to check that we never get ExtQualType(ExtQualType(T)). llvm-svn: 64970
* Add anti-FIXME.Daniel Dunbar2009-02-181-1/+4
| | | | llvm-svn: 64969
* i386 ABI: Offset computation in va_arg was incorrect for sizeof(Ty)>4.Daniel Dunbar2009-02-181-6/+3
| | | | | | We are down to only failing gcc.dg/compat/vector-[12] (8 tests total). llvm-svn: 64967
* Remove pointless backslashDouglas Gregor2009-02-181-1/+1
| | | | llvm-svn: 64965
* Downgrade the "excess elements in initializer" errors to warnings *inDouglas Gregor2009-02-181-4/+10
| | | | | | C*. They're required errors in C++. llvm-svn: 64964
* x86_64 ABI: Fix thinko in computation of bound for "passed in SSE regs" test.Daniel Dunbar2009-02-181-1/+1
| | | | | | Two more gcc/x86_64 failures down. llvm-svn: 64963
* Fix diagnostics bugs when computing ranges for the retain/release checker.Ted Kremenek2009-02-181-1/+4
| | | | llvm-svn: 64962
* rip out __builtin_overloadChris Lattner2009-02-189-204/+0
| | | | llvm-svn: 64961
* HTMLDiagnostics: Always display diagnostics *below* the line in question.Ted Kremenek2009-02-181-22/+7
| | | | llvm-svn: 64959
* x86_64 ABI: "is passed in regs" computation for va_arg was broken forDaniel Dunbar2009-02-181-1/+1
| | | | | | | | things passed in mixed registers. This knocks out 8 x86_64 failures. llvm-svn: 64958
* Return true on errors, return true on errors, return true on errorsDouglas Gregor2009-02-181-1/+1
| | | | llvm-svn: 64957
* retain/release checker: We now emit fancy diagnostics telling users about theTed Kremenek2009-02-181-50/+88
| | | | | | semantics of CFMakeCollectable and friends. llvm-svn: 64956
* Downgrade complaints about calling unavailable functions to a warningDouglas Gregor2009-02-189-79/+219
| | | | | | | | | | | | | | | | | | (as GCC does), except when we've performed overload resolution and found an unavailable function: in this case, we actually error. Merge the checking of unavailable functions with the checking for deprecated functions. This unifies a bit of code, and makes sure that we're checking for unavailable functions in the right places. Also, this check can cause an error. We may, eventually, want an option to make "unavailable" warnings into errors. Implement much of the logic needed for C++0x deleted functions, which are effectively the same as "unavailable" functions (but always cause an error when referenced). However, we don't have the syntax to specify deleted functions yet :) llvm-svn: 64955
* Some refactoring and simplificaiotn of objc's gcFariborz Jahanian2009-02-182-17/+26
| | | | | | ir gen. llvm-svn: 64954
* Codegen for int (^bp)(int) = 0;Mike Stump2009-02-181-2/+4
| | | | llvm-svn: 64951
* __attribute__((aligned)) was being ignored!Daniel Dunbar2009-02-181-1/+2
| | | | | | This knocks out another 8 gcc/compat/i386 & x86_64 failures. llvm-svn: 64947
* Add Type::isSpecificBuiltinType as a shortcut.Daniel Dunbar2009-02-181-3/+2
| | | | llvm-svn: 64946
* Simplify.Daniel Dunbar2009-02-181-2/+1
| | | | llvm-svn: 64944
* final string diagnostic issue (that I know about):Chris Lattner2009-02-181-16/+3
| | | | | | | | | | | | | | | | | we used to not account for escapes in strings with string concat. Before: t.m:5:20: warning: field width should have type 'int', but argument has type 'unsigned int' printf("\n\n" "\n\n%*d", (unsigned) 1, 1); ^ ~~~~~~~~~~~~ after: t.m:5:23: warning: field width should have type 'int', but argument has type 'unsigned int' printf("\n\n" "\n\n%*d", (unsigned) 1, 1); ^ ~~~~~~~~~~~~ llvm-svn: 64941
* Next step toward making string diagnostics correct: handleChris Lattner2009-02-182-5/+54
| | | | | | | | | | | | | escapes in the string for subtoken positioning. This gives us working examples like: t.m:5:16: warning: field width should have type 'int', but argument has type 'unsigned int' printf("\n\n%*d", (unsigned) 1, 1); ^ ~~~~~~~~~~~~ where before the caret pointed two spaces to the left. llvm-svn: 64940
* update comment.Chris Lattner2009-02-181-5/+1
| | | | llvm-svn: 64939
* retain/release checker: Distinguish in the function summaries betweenTed Kremenek2009-02-181-12/+27
| | | | | | | | retain/releases performed via [... release] and CFRetain(). The former are no-ops in GC. The checker already handled this, but now we emit nice diagnostics to the user telling them that these are no-ops. llvm-svn: 64937
* Fix some issues handling sub-token locations that come from macro expansions.Chris Lattner2009-02-182-9/+4
| | | | | | | | | | | | | | | We now emit: t.m:6:15: warning: field width should have type 'int', but argument has type 'unsigned int' printf(STR, (unsigned) 1, 1); ^ ~~~~~~~~~~~~ t.m:3:18: note: instantiated from: #define STR "abc%*ddef" ^ which has the correct location in the string literal in the note line. llvm-svn: 64936
* Start generating gc'able code using the newFariborz Jahanian2009-02-182-26/+17
| | | | | | objc gc type attributes. llvm-svn: 64935
* tidy upChris Lattner2009-02-181-3/+1
| | | | llvm-svn: 64934
* only get the spelling of a token to get its length if Chris Lattner2009-02-181-5/+12
| | | | | | it needs cleaning. llvm-svn: 64932
* use the full spelling of a string literal token so that trigraphsChris Lattner2009-02-181-1/+8
| | | | | | | | | | | | | | | | | | | | | and escaped newlines don't throw off the offset computation. On this testcase: printf("abc\ def" "%*d", (unsigned) 1, 1); Before: t.m:5:5: warning: field width should have type 'int', but argument has type 'unsigned int' def" ^ after: t.m:6:12: warning: field width should have type 'int', but argument has type 'unsigned int' "%*d", (unsigned) 1, 1); ^ ~~~~~~~~~~~~ llvm-svn: 64930
* Make warn-weak-field.m test pass again.Fariborz Jahanian2009-02-181-0/+2
| | | | llvm-svn: 64927
* Cleanup objc's gc attributes code no longer needed.Fariborz Jahanian2009-02-183-35/+19
| | | | | | | | This make warn-weak-field.m to fail (subject of a followup patch). attr-objc-gc.m no passes. llvm-svn: 64925
* Start improving diagnostics that relate to subcharacters of string literals.Chris Lattner2009-02-182-17/+82
| | | | | | | | | | | | | | | | | | | | First step, handle diagnostics in StringLiteral's that are due to token pasting. For example, we now handle: id str2 = @"foo" "bar" @"baz" " b\0larg"; // expected-warning {{literal contains NUL character}} Correctly: test/SemaObjC/exprs.m:17:15: warning: CFString literal contains NUL character " b\0larg"; // expected-warning {{literal contains NUL character}} ~~~^~~~~~~ There are several other related issues still to be done. llvm-svn: 64924
* Update Parser::ParseTypeName to return a TypeResult, which also tellsDouglas Gregor2009-02-186-46/+90
| | | | | | | | us whether there was an error in trying to parse a type-name (type-id in C++). This allows propagation of errors further in the compiler, suppressing more bogus error messages. llvm-svn: 64922
* Revise comment. Comparing pointer values in 'Range' wasn't the performance ↵Ted Kremenek2009-02-181-5/+3
| | | | | | issue I thought it was, but it is still worth ordering Range objects by their APSInt values. llvm-svn: 64921
* Add an unavailable __tg_promote function to attract incorrect uses of ↵Douglas Gregor2009-02-181-0/+3
| | | | | | type-generic macros, rom Howard Hinnant. llvm-svn: 64919
* nothing says "ted was here" like a random url dropped in a header :)Chris Lattner2009-02-181-1/+1
| | | | llvm-svn: 64903
* Allow "overloadable" functions in C to be declared as variadic withoutDouglas Gregor2009-02-185-12/+27
| | | | | | | | | | | | | | | any named parameters, e.g., this is accepted in C: void f(...) __attribute__((overloadable)); although this would be rejected: void f(...); To do this, moved the checking of the "ellipsis without any named arguments" condition from the parser into Sema (where it belongs anyway). llvm-svn: 64902
* teach child iterators to walk into the child string of an ObjCStringLiteral,Chris Lattner2009-02-181-2/+2
| | | | | | so it shows up in -ast-dump. llvm-svn: 64901
* fix the ownership issues and location tracking inChris Lattner2009-02-181-16/+22
| | | | | | Sema::ParseObjCStringLiteral. llvm-svn: 64900
* privatize all of the string literal memory allocation/creationChris Lattner2009-02-184-61/+31
| | | | | | stuff behind a private static function. llvm-svn: 64898
* Don't allow calls to functions marked "unavailable". There's more workDouglas Gregor2009-02-182-5/+29
| | | | | | | | | | to do in this area, since there are other places that reference FunctionDecls. Don't allow "overloadable" functions (in C) to be declared without a prototype. llvm-svn: 64897
* add some comments describing what is happening here.Chris Lattner2009-02-181-9/+17
| | | | llvm-svn: 64896
OpenPOWER on IntegriCloud