summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add '_assert' to list of known panic functions.Ted Kremenek2009-02-171-2/+4
| | | | llvm-svn: 64772
* Handle fatal errors.Ben Laurie2009-02-171-0/+1
| | | | llvm-svn: 64770
* Be sure to initialize Name.Mike Stump2009-02-171-1/+1
| | | | llvm-svn: 64769
* Fixup spacing a little.Mike Stump2009-02-171-6/+6
| | | | llvm-svn: 64768
* Remove the error about redefining library functions. It's causing tooDouglas Gregor2009-02-171-5/+3
| | | | | | much pain when compiling the Linux kernel (PR3592). llvm-svn: 64767
* As an experimental hack, emit "instantiated from" information inChris Lattner2009-02-171-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostics. I'm not sure I want to keep this, but hey, it's easy and could be useful or something, even if guarded by a -fshow-me-tons-of-details option. A silly example is: #define A B #define C A #define D C int y = D; We now emit: t.c:11:9: error: use of undeclared identifier 'B' int y = D; ^ t.c:9:11: note: instantiated from: #define D C ^ t.c:8:11: note: instantiated from: #define C A ^ t.c:7:11: note: instantiated from: #define A B ^ A more useful example is from tgmath: t.c:4:9: error: no matching function for call to '__tg_acos' return acos(x); ^~~~~~~ /Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:51:17: note: instantiated from: #define acos(x) __tg_acos(x) ^ ... candidate set follows ... This does not yet print ranges in instantiation info, (e.g. highlighting the range "__tg_acos(x)" in the last example), but that could be added if we decide this is a good idea :). Thoughts and bug reports welcome! llvm-svn: 64761
* add an accessor.Chris Lattner2009-02-171-0/+9
| | | | llvm-svn: 64760
* emit:Chris Lattner2009-02-172-4/+5
| | | | | | | | | | | | | | | t.c:4:9: error: invalid type 'short *' to __real operator __tg_choose (__real__(z), C##f(z), (C)(z), C##l(z)), ^ instead of: t.c:4:9: error: invalid type 'short *' to __real or __imag operator __tg_choose (__real__(z), C##f(z), (C)(z), C##l(z)), ^ fixing a fixme. It would be even fancier to get the spelling of the token, but I don't care *that* much :) llvm-svn: 64759
* add an accessor.Chris Lattner2009-02-171-0/+12
| | | | llvm-svn: 64758
* Spell __always_inline__ correctly.Daniel Dunbar2009-02-171-4/+4
| | | | llvm-svn: 64757
* x86_64 ABI: Fix assert on return of _Complex long double.Daniel Dunbar2009-02-171-5/+6
| | | | llvm-svn: 64756
* sink a call to getInstantiationLoc to eliminate an assertion.Chris Lattner2009-02-171-4/+5
| | | | llvm-svn: 64755
* break down EmitCaretDiagnostic to use more primitive calls.Chris Lattner2009-02-171-13/+27
| | | | llvm-svn: 64754
* add some files to fix the cmake build, patch by Piotr Rak!Chris Lattner2009-02-171-0/+2
| | | | llvm-svn: 64752
* split caret diagnostic printing out into its own function.Chris Lattner2009-02-171-59/+65
| | | | llvm-svn: 64751
* simplify some code.Chris Lattner2009-02-171-5/+5
| | | | llvm-svn: 64750
* remove "; candidates are/is:" from various ambiguity diagnostics.Chris Lattner2009-02-173-13/+9
| | | | | | 2 out of 2 people on irc prefer them gone :) llvm-svn: 64749
* fix a minor bug with my previous patchChris Lattner2009-02-171-1/+3
| | | | llvm-svn: 64747
* fix notes so that they are always filtered with the same logic Chris Lattner2009-02-171-45/+79
| | | | | | | | | as the last non-note diagnostic that preceeded them. This ensures that diagnostics in main files which have notes with locations in system headers get all the bits and pieces emitted or not in a unit. This fixes PR3215. llvm-svn: 64746
* If a source range comes through a function-like macro expansion,Chris Lattner2009-02-171-0/+8
| | | | | | | | | | | | | | | | | | highlight the arguments to the macro as well as the identifier. Before: t.c:3:9: error: no matching function for call to '__tg_acos'; candidates are: return acos(x); ^~~~ after: t.c:3:9: error: no matching function for call to '__tg_acos'; candidates are: return acos(x); ^~~~~~~ llvm-svn: 64743
* Static variables and functions won't collide with standard libraryDouglas Gregor2009-02-172-1/+7
| | | | | | | functions, so if we're declaring a static we should implicitly declare a library function by the same name (e.g., malloc, strdup). Fixes PR3592. llvm-svn: 64736
* Add SSSE3 headerAnders Carlsson2009-02-171-0/+218
| | | | llvm-svn: 64735
* x86_64 ABI: Implement classification for bit-fields.Daniel Dunbar2009-02-171-2/+26
| | | | llvm-svn: 64727
* remove dead macrosChris Lattner2009-02-171-19/+0
| | | | llvm-svn: 64725
* explicitly cast integers to double. This a) silences any Chris Lattner2009-02-171-17/+19
| | | | | | | | possible future "data loss" warnings, and b) makes it intensely obvious to the user what the impl of these functions do in a ambiguity error. llvm-svn: 64724
* asin support. No we don't care about complex int :)Chris Lattner2009-02-171-1/+13
| | | | llvm-svn: 64723
* hand macro expand this to make "candidate" set printing more useful. However,Chris Lattner2009-02-171-1/+16
| | | | | | | | | | | | | | | | Now no candidates are printed because the 'notes' are in a system header. :( #include <tgmath-sofar.h> double foo2(short *x) { return acos(x); } t.c:10:10: error: no matching function for call to '__tg_acos'; candidates are: return acos(x); ^~~~ 1 diagnostic generated. llvm-svn: 64722
* add support for integers to tgmath functions. I apparently need to provide Chris Lattner2009-02-171-8/+14
| | | | | | all the integer types other than char/short to avoid overload ambiguities. llvm-svn: 64721
* start converting over to attr(overloadable). Unfortunately, thisChris Lattner2009-02-171-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | produces really horrible diagnostics when overload ambiguities happen: t.c:10:10: error: call to '__tg_acos' is ambiguous; candidates are: return acos(x); ^~~~ In file included from t.c:1: /Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function __TG_RC_1(x, acos, cacos) ^ /Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function __TG_RC_1(x, acos, cacos) ^ /Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function __TG_RC_1(x, acos, cacos) ^ /Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function __TG_RC_1(x, acos, cacos) ^ /Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function __TG_RC_1(x, acos, cacos) ^ /Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:49:1: note: candidate function __TG_RC_1(x, acos, cacos) ^ A possible fix is to just not use macros for this, which I'll probably go for, but it would be nice to emit the type at the call, so we know what we asked for! llvm-svn: 64720
* Make PragmaPackStack be a private class in SemaAttr and make itsChris Lattner2009-02-173-64/+103
| | | | | | instance in Sema be a pimpl. llvm-svn: 64718
* Added ClassTemplateSpecializationDecl, which is a subclass ofDouglas Gregor2009-02-174-31/+199
| | | | | | | | | | | | | | | | | | CXXRecordDecl that is used to represent class template specializations. These are canonical declarations that can refer to either an actual class template specialization in the code, e.g., template<> class vector<bool> { }; or to a template instantiation. However, neither of these features is actually implemented yet, so really we're just using (and uniqing) the declarations to make sure that, e.g., A<int> is a different type from A<float>. Note that we carefully distinguish between what the user wrote in the source code (e.g., "A<FLOAT>") and the semantic entity it represents (e.g., "A<float, int>"); the former is in the sugared Type, the latter is an actual Decl. llvm-svn: 64716
* copying and assignment of sema seem unwise :)Chris Lattner2009-02-171-0/+2
| | | | llvm-svn: 64712
* move attribute(packed) sema support out of SemaDecl into a new SemaAttr.cpp ↵Chris Lattner2009-02-173-95/+112
| | | | | | file. llvm-svn: 64711
* simplify this code and make it use highlight range. ThisChris Lattner2009-02-171-19/+8
| | | | | | | | | | | | | makes -emit-html do nice things for code like: #define FOO(X) y int FOO(4 ); highlighting the FOO instance as well as the ) on the next line properly. llvm-svn: 64710
* x86_64 ABI: Handle va_arg arguments with alignment > 8.Daniel Dunbar2009-02-161-4/+15
| | | | llvm-svn: 64701
* Diagnose non-power-of-2 arguments to attribute aligned.Daniel Dunbar2009-02-161-0/+6
| | | | llvm-svn: 64700
* Add support for throwing exceptions to the nonfragile ABIAnders Carlsson2009-02-161-15/+34
| | | | llvm-svn: 64692
* Added implementation of objc2's gc API calls forFariborz Jahanian2009-02-161-16/+70
| | | | | | nonfragile abi. llvm-svn: 64690
* Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.Daniel Dunbar2009-02-164-3/+42
| | | | | | | | | | | | | | | | - Define pow[lf]?, sqrt[lf]? as builtins. - Add -fmath-errno option which binds to LangOptions.MathErrno - Add new builtin flag Builtin::Context::isConstWithoutErrno for functions which can be marked as const if errno isn't respected for math functions. Sema automatically marks these functions as const when they are defined, if MathErrno=0. - IRgen uses const attribute on sqrt and pow library functions to decide if it can use the llvm intrinsic. llvm-svn: 64689
* Unbreak clang.Daniel Dunbar2009-02-161-1/+1
| | | | | | | | Doug: please verify that it is expected that LastIdx can be less that NumInits. And perhaps add a comment so that Chris doesn't break your code. :) llvm-svn: 64688
* Make "implicit int" an error in C++ (unless we're allowing MicrosoftDouglas Gregor2009-02-161-4/+6
| | | | | | extensions). This caught a couple bugs in our test suite :) llvm-svn: 64686
* fix long lines.Chris Lattner2009-02-163-10/+14
| | | | llvm-svn: 64684
* fix volatile handling with ExtVectorElementExpr, so that weChris Lattner2009-02-162-10/+13
| | | | | | | | | | | emit two volatile loads for: typedef __attribute__(( ext_vector_type(4) )) float float4; float test(volatile float4 *P) { return P->x+P->y; } llvm-svn: 64683
* introduce and use a new ExtVectorElementExpr::isArrow method, at Eli's ↵Chris Lattner2009-02-162-4/+11
| | | | | | suggestion llvm-svn: 64681
* Use isa<...> instead of dyn_cast<...> where result is not needed.Fariborz Jahanian2009-02-161-1/+1
| | | | llvm-svn: 64680
* diagnose uses of deprecated typenames and tags.Chris Lattner2009-02-163-20/+33
| | | | | | We now pass all the deprecation tests in the objc.dg suite. llvm-svn: 64679
* Supply the header corresponding to a library builtin as a separate argument ↵Douglas Gregor2009-02-163-20/+9
| | | | | | to the LIBBUILTIN macro llvm-svn: 64676
* Fix IRgen of __builtin_memset.Daniel Dunbar2009-02-161-1/+2
| | | | | | - Fix test case to not only have negative tests. llvm-svn: 64674
* random cleanupChris Lattner2009-02-161-2/+1
| | | | llvm-svn: 64673
* Fixes a bug in property type encoding.Fariborz Jahanian2009-02-161-1/+2
| | | | llvm-svn: 64672
OpenPOWER on IntegriCloud