Commit Graph

14213 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis bff082aec9 Add documentation for the Index library to clang's web page.
llvm-svn: 75222
2009-07-10 03:41:36 +00:00
Argyrios Kyrtzidis 6dd7181ed4 Simplify a bit by using functions instead of checking enum values. No functionality change.
llvm-svn: 75221
2009-07-10 03:41:26 +00:00
Ted Kremenek f66557978e Switch BasicStoreManager to use the new CastRegion implementation by default,
and replace the 'clang-cc' option '-analyzer-store=basic-new-cast' with
'-analyzer-store=basic-old-cast'. We'll keep the old CastRegion implementation
around for a little while for regression testing.

llvm-svn: 75209
2009-07-10 00:41:58 +00:00
Fariborz Jahanian 5582f231f2 don't crash if class is using itself as its super class.
llvm-svn: 75178
2009-07-09 22:08:26 +00:00
Anders Carlsson cf1441ab20 Fix another decltype crash.
llvm-svn: 75175
2009-07-09 22:00:53 +00:00
Fariborz Jahanian 341583c3ac Sema check on out of order object initialization of
class object's base and members under -Wreorder flag.

llvm-svn: 75168
2009-07-09 19:59:47 +00:00
Anders Carlsson 17973e684d Use getDeclName in DefineImplicitOverloadedAssign as well.
llvm-svn: 75152
2009-07-09 17:47:25 +00:00
Douglas Gregor b05ce0f395 Another little test for C++ [over.over]
llvm-svn: 75151
2009-07-09 17:44:05 +00:00
Anders Carlsson 52b9180587 Pass the DeclName to the diagnostic builder so that member names will be quoted correctly.
llvm-svn: 75150
2009-07-09 17:37:12 +00:00
Ted Kremenek 7127801201 Update checker build.
llvm-svn: 75147
2009-07-09 17:20:25 +00:00
Douglas Gregor 6b6ba8bad8 Add test for C++ [over.over.]p1, the contexts in which one can take the address of an overloaded function.
llvm-svn: 75146
2009-07-09 17:16:51 +00:00
Zhongxing Xu 1796772267 Remove dead code.
llvm-svn: 75127
2009-07-09 09:17:11 +00:00
Anders Carlsson 03f89b1828 Store the isAddressOfOperand in the UnresolvedDeclRefExpr, so that we can pass it when instantiating the expr. Fixes another member pointer bug.
llvm-svn: 75075
2009-07-09 00:05:08 +00:00
Douglas Gregor b257e4fff8 Implement the simple form of overload resolution used when taking the
address of an overloaded function (which may involve both functions
and function templates). 

llvm-svn: 75069
2009-07-08 23:33:52 +00:00
Ted Kremenek 8ee3dd7cc5 Fix: <rdar://problem/7034511> ValueManager::makeIntVal(uint64_t X, QualType T) should return a 'Loc' when 'T' is a pointer
llvm-svn: 75062
2009-07-08 22:42:46 +00:00
Anders Carlsson 0b675f5ad5 It's not allowed to form member pointers to members that have reference type. Add a test for this and the rest of [dcl.mptr]p3.
llvm-svn: 75054
2009-07-08 21:45:58 +00:00
Douglas Gregor 79ca34de78 Bump the PCH version number
llvm-svn: 75049
2009-07-08 21:07:44 +00:00
Douglas Gregor 9b14658713 Implement template argument deduction when taking the address of a
function template. Most of the change here is in factoring out the
common bits used for template argument deduction from a function call
and when taking the address of a function template.

llvm-svn: 75044
2009-07-08 20:55:45 +00:00
Owen Anderson c9673d5bae Update for IRBuilder API change.
llvm-svn: 75041
2009-07-08 20:52:20 +00:00
Owen Anderson c10c8d3e2b Update for LLVM API change.
llvm-svn: 75028
2009-07-08 19:05:04 +00:00
Anders Carlsson 5b2095ce16 Implement code generation of ChooseExpr for aggregate types.
llvm-svn: 75021
2009-07-08 18:33:14 +00:00
Fariborz Jahanian 8e0d04249d Patch adds test to my previous patch for assigning to
gc'able structs in the Next runtime and adds missing
PCH info.

llvm-svn: 75014
2009-07-08 16:37:44 +00:00
Chris Lattner 26670dcba1 fix PR4513, a build problem with VC++, patch by James Abbatiello!
llvm-svn: 75013
2009-07-08 16:24:37 +00:00
Duncan Sands 9cb27e9c08 Correct FreeBSD target info, fixing PR4514.
Patch by Roman Divacky.

llvm-svn: 75003
2009-07-08 13:55:08 +00:00
Douglas Gregor be759256b9 Fix a corner case with argument-dependent lookup and overloaded function sets.
llvm-svn: 74999
2009-07-08 10:57:20 +00:00
Douglas Gregor ed3c80eb75 Update the C++ status table to better reflect our support for function overloading
llvm-svn: 74997
2009-07-08 10:03:09 +00:00
Douglas Gregor 197e5f7bb7 Improve argument-dependent lookup to find associated classes and
namespaces based on the template arguments of a class template
specialization type.

llvm-svn: 74993
2009-07-08 07:51:57 +00:00
Argyrios Kyrtzidis d8ffadcd82 Initialize the ConstantArraySizeAsWritten field of PrintingPolicy class.
It contained garbage since the constructor didn't initialize it and caused test/Sema/array-constraint.c to randomly fail.

llvm-svn: 74989
2009-07-08 02:17:42 +00:00
Owen Anderson 9f211fb4fa Update for LLVM API change.
llvm-svn: 74986
2009-07-08 01:29:18 +00:00
Fariborz Jahanian 5f21d2f69a Implemented memmove_collectable API for Next runtime
when struct variables with GC'able members are copied into.
Will provide a test case later.

llvm-svn: 74984
2009-07-08 01:18:33 +00:00
Chris Lattner 2a7deb64c0 reimplement vector comparisons as [fi]cmp+sext instead of using v[if]cmp.
Also, enable them in sema so that they are tested, and now that the x86 backend
has stablized.

llvm-svn: 74983
2009-07-08 01:08:03 +00:00
Douglas Gregor abd6813ff9 The canonical type of typeof or decltype with a dependent type is itself,
not Context.DependentTy. I'll let Anders check in the test case for this one...

llvm-svn: 74975
2009-07-08 00:03:05 +00:00
Douglas Gregor d3cb356d14 Overload resolution prefers non-templates to templates
llvm-svn: 74971
2009-07-07 23:38:56 +00:00
Douglas Gregor 9fc6097145 Template argument deduction from a call has improved a bit
llvm-svn: 74966
2009-07-07 23:12:18 +00:00
Douglas Gregor e81f3e71f8 Improve template argument deduction from a call. In particular,
implement C++ [temp.deduct.call]p3b3, which allows a template-id
parameter to match a derived class of the argument, while deducing
template arguments.

llvm-svn: 74965
2009-07-07 23:09:34 +00:00
Nate Begeman 425038cc6d Extra vector element initializers in OpenCL is an error, not a warning.
llvm-svn: 74951
2009-07-07 21:53:06 +00:00
Sebastian Redl 86be854fa8 Implement checking of exception spec compatibility for overriding virtual functions.
llvm-svn: 74943
2009-07-07 20:29:57 +00:00
Anders Carlsson 1f9648da17 Some (most) type trait expressions require that the argument passed in is a complete type.
llvm-svn: 74937
2009-07-07 19:06:02 +00:00
Fariborz Jahanian 385db80cc5 Diagnose, and not crash, when taking address of property expression.
llvm-svn: 74935
2009-07-07 18:50:52 +00:00
Chris Lattner de50a0c251 Convert the CharInfo table to be statically initialized, instead of dynamically initialized. Patch by Ryan Flynn!
llvm-svn: 74919
2009-07-07 17:09:54 +00:00
Douglas Gregor 2074977695 Tighten up the conditions under which we build an implicit function
declaration for a builtin.

llvm-svn: 74917
2009-07-07 17:00:05 +00:00
Douglas Gregor 27821cee82 Make ASTContext explicitly keep track of the declaration for the C
FILE type, rather than using name lookup to find FILE within the
translation unit. Within precompiled headers, FILE is treated as yet
another "special type" (like __builtin_va_list).

This change should provide a performance improvement (not verified),
since the lookup into the translation unit declaration 
forces the (otherwise unneeded) construction of a large hash table.
More importantly, with precompiled headers, the construction
of that table requires deserializing most of the top-level
declarations from the precompiled header, which are then unused.

Fixes PR 4509.

llvm-svn: 74911
2009-07-07 16:35:42 +00:00
Fariborz Jahanian 003a880c41 A few change per Doug's feedback.
- Fariborz

llvm-svn: 74909
2009-07-07 16:24:08 +00:00
Zhongxing Xu 6999b90146 Fix comment.
llvm-svn: 74896
2009-07-07 07:14:55 +00:00
Chris Lattner 5c34938aa4 fix an out-of-date comment.
llvm-svn: 74894
2009-07-07 05:05:42 +00:00
Sanjiv Gupta 30f95ec27d pic16 preproc defs.
llvm-svn: 74893
2009-07-07 04:42:23 +00:00
Zhongxing Xu cf67e61faa fix comment.
llvm-svn: 74890
2009-07-07 01:36:53 +00:00
Argyrios Kyrtzidis 3f50f7e853 Refactor DeclLocResolver/StmtLocResolver into a more functional style by removing the search state
and by having their Visit* methods return the ASTLocation directly.

llvm-svn: 74887
2009-07-07 00:53:31 +00:00
Douglas Gregor 0086a5a3bb Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the 
headers available when using the PCH file.

Addresses <rdar://problem/7001604>.

llvm-svn: 74885
2009-07-07 00:12:59 +00:00
Ted Kremenek 97213bac53 NewCastRegion: Handle casts *from* pointers to incomplete structs to other types.
llvm-svn: 74884
2009-07-06 23:47:19 +00:00