]>
granicus.if.org Git - clang/log
Anders Carlsson [Tue, 6 Oct 2009 22:07:00 +0000 (22:07 +0000)]
Add files to xcode project.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 6 Oct 2009 21:58:01 +0000 (21:58 +0000)]
When mangling names, always use the canonical decl. Fixes PR5144.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 6 Oct 2009 21:53:41 +0000 (21:53 +0000)]
InsertSubprogramStart if ATTACH_DEBUG_INFO_TO_AN_INSN is not defined.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 6 Oct 2009 21:27:51 +0000 (21:27 +0000)]
Test explicit specialization for all of the various cases where
explicit specializations can occur. Also, fix a minor recovery bug
where we should allow declarations coming from the parser to be NULL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83416
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 6 Oct 2009 20:30:09 +0000 (20:30 +0000)]
Add more of __builtin_abort, WIP, still missing codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83410
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 6 Oct 2009 20:19:01 +0000 (20:19 +0000)]
Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83408
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 6 Oct 2009 18:36:08 +0000 (18:36 +0000)]
Add support to attach debug info to an instruction.
This is not yet enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83399
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 6 Oct 2009 18:12:12 +0000 (18:12 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83398
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 6 Oct 2009 18:09:57 +0000 (18:09 +0000)]
Emit the destructor epilogue in a cleanup block so a return from a destructor body still calls the epilogue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 6 Oct 2009 17:59:45 +0000 (17:59 +0000)]
Refactor the code that walks a C++ inheritance hierarchy, searching
for bases, members, overridden virtual methods, etc. The operations
isDerivedFrom and lookupInBases are now provided by CXXRecordDecl,
rather than by Sema, so that CodeGen and other clients can use them
directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 6 Oct 2009 17:54:23 +0000 (17:54 +0000)]
Pass the right type to GetAddrOfFunction when getting functions for the VTable. Fixes PR5021.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 6 Oct 2009 12:45:37 +0000 (12:45 +0000)]
Add the -nostdclanginc option to clang (the driver).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83377
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 6 Oct 2009 03:49:25 +0000 (03:49 +0000)]
Fix 'clang-cc -analyzer-display-progress' by flushing standard error after printing the name of the analyzed function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83369
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 6 Oct 2009 03:44:49 +0000 (03:44 +0000)]
Fix crash introduced by r83358 where a symbol could be eagerly
evaluated to an APSInt with a different bitwidth than the other
operand in a binary expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 6 Oct 2009 01:39:48 +0000 (01:39 +0000)]
Fix: <rdar://problem/
7275774 > Static analyzer warns about NULL pointer when
adding assert
This fix required a few changes:
SimpleSValuator:
- Eagerly replace a symbolic value with its constant value in EvalBinOpNN
when it is constrained to a constant. This allows us to better constant fold
values along a path.
- Handle trivial case of '<', '>' comparison of pointers when the two pointers
are exactly the same.
RegionStoreManager:
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 6 Oct 2009 01:33:02 +0000 (01:33 +0000)]
Refactor the c++ include path a bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83357
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 6 Oct 2009 00:35:31 +0000 (00:35 +0000)]
Set appropriate context for a global variable while emitting debug info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83352
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 6 Oct 2009 00:09:31 +0000 (00:09 +0000)]
Refixed pr5086 by letting Expr::isNullPointerConstant
handle checking for a null pointer for a zero-valued
enumerator; moving the test case from CodeGen to Sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 5 Oct 2009 23:40:59 +0000 (23:40 +0000)]
This is slightly contentious, but, if llvm has gone to addressable
units, we should as well. The problem is the non-predictability of
the dimension of the values. I'd love for the dimension to be part of
the static type system... but in C++ it is kinda annoying to do.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83345
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 5 Oct 2009 23:08:21 +0000 (23:08 +0000)]
Fix thinko and simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83342
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 5 Oct 2009 22:49:20 +0000 (22:49 +0000)]
Ensure we have atleast 2-byte alignment for member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83337
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Oct 2009 22:29:42 +0000 (22:29 +0000)]
Make sure that c-index-test links as a C++ executable
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83335
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Oct 2009 22:25:29 +0000 (22:25 +0000)]
Make sure that libCIndex links as a C++ library
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 5 Oct 2009 22:24:47 +0000 (22:24 +0000)]
Testcase for recent checkin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Mon, 5 Oct 2009 21:58:44 +0000 (21:58 +0000)]
Respect alignments better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83328
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 5 Oct 2009 21:33:42 +0000 (21:33 +0000)]
Fix C90 compile warning about mixed declarations and code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 5 Oct 2009 21:32:49 +0000 (21:32 +0000)]
tweaked my last patch to 1) preserve the protocol in
extension class's protocol list so its AST is complete.
2) Because of this no need to issue warning on unimplemeted
methods coming from the extended class protocols
because warning is issued when class definition is seen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83326
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Oct 2009 21:16:22 +0000 (21:16 +0000)]
remove this test, grepping for define isn't really testing anything.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83325
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Oct 2009 21:07:28 +0000 (21:07 +0000)]
Encode the Clang branch and Subversion revision into a PCH file, and
assume that PCH files from different Clang revisions are not
compatible. Addresses <rdar://problem/
7266572 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 5 Oct 2009 20:41:32 +0000 (20:41 +0000)]
Patch to implement Protocols on class extensions.
<rdar://problem/
7269631 > Protocols on class extensions don't work
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83322
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Oct 2009 20:33:49 +0000 (20:33 +0000)]
Provide a common set of routines in Version.h that return Subversion
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83321
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 5 Oct 2009 18:52:24 +0000 (18:52 +0000)]
Pre-commit commit to get URL keyword expansion for Clang version information
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83319
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 5 Oct 2009 17:58:19 +0000 (17:58 +0000)]
- Fix assert in clang_getCursorDecl (having to do with recently added ObjC_ProtocolRef).
- Make sure CHECK: lines in test case match the expected output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83316
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 5 Oct 2009 13:47:21 +0000 (13:47 +0000)]
Use new predicates for some type equality tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 5 Oct 2009 13:12:17 +0000 (13:12 +0000)]
Add a -nostdclanginc flag to clang-cc that prevents it from searching
its own binary-relative headers. Useful when using clang's preprocessor
with gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83302
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 19:56:56 +0000 (19:56 +0000)]
Pass the canonical method decl to GetVtableIndex. Fixes PR5120.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83272
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 19:43:08 +0000 (19:43 +0000)]
Implement code generation of member function pointer calls. Fixes PR5121.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83271
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 17:40:22 +0000 (17:40 +0000)]
Create CXXMemberCallExpr for pointer-to-member calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 16:30:22 +0000 (16:30 +0000)]
Ignore No-op casts when evaluating lvalue expressions. Fixes PR5122.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 15:43:24 +0000 (15:43 +0000)]
Teach AggExprEmitter about pointers to member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83266
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 15:13:22 +0000 (15:13 +0000)]
Handle base-to-derived casts of member function pointers in CGExprConstant.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83265
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 15:02:02 +0000 (15:02 +0000)]
Handle members to function pointers in CGExprConstant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83264
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 14:56:57 +0000 (14:56 +0000)]
Move some functions from CodeGenFunctions to CodeGenModule so they can be used by CGExprConstant.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 3 Oct 2009 14:39:13 +0000 (14:39 +0000)]
Rewrite member function pointer test not to rely on -O2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83262
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 2 Oct 2009 12:19:16 +0000 (12:19 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 2 Oct 2009 10:32:51 +0000 (10:32 +0000)]
FileCheckize test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83244
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 2 Oct 2009 04:52:12 +0000 (04:52 +0000)]
Don't update the struct alignment when adding fields to a packed struct. Fixes PR5118.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 2 Oct 2009 02:30:50 +0000 (02:30 +0000)]
More magic pixie dust.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83232
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 2 Oct 2009 02:23:37 +0000 (02:23 +0000)]
Fix up debug information for block pointers a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 2 Oct 2009 02:15:20 +0000 (02:15 +0000)]
When building constant structs, check if the resulting LLVM struct will be bigger than the record layout size and use a packed struct if that's the case. Fixes PR5108.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83230
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 1 Oct 2009 23:51:25 +0000 (23:51 +0000)]
Make sure to free the explicit template arguments provided for an
explicit instantiation. Also, tighten up reference-count checking to
help catch these issues earlier. Fixes PR5069.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83225
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 1 Oct 2009 23:46:04 +0000 (23:46 +0000)]
- Remove Sema::FindMethodInNestedImplementations().
- Add ObjCInterfaceDecl::lookupPrivateInstanceMethod().
- Convert clients.
No functionality change - One less method in Sema:-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83224
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 1 Oct 2009 23:25:31 +0000 (23:25 +0000)]
When the return type of a function is dependent, don't perform any
of the flow-control checks for falling off the end of a function,
since the return type may instantiate to void. Similarly, if a
return statement has an expression and the return type of the function
is void, don't complain if the expression is type-dependent, since
that type could instantiate to void.
Fixes PR5071.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83222
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 1 Oct 2009 22:29:41 +0000 (22:29 +0000)]
Implement a FIXME. This improves codegen just a tad.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83221
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 1 Oct 2009 22:10:15 +0000 (22:10 +0000)]
enumerator value of 0 is not a null pointer constant for
deciding const of null pointer conversion. Fixes PR5086.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83217
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 1 Oct 2009 20:44:19 +0000 (20:44 +0000)]
CodeGen may see out-of-line declarations of the various special member
functions when they are explicitly declared, e.g., via a function
template specialization or explicit template instantiation
declaration. Don't try to synthesize bodies for the special member
functions in this case; rather, check whether we have an implicit
declaration and, if so, synthesize the appropriate function
body. Fixes PR5084.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 1 Oct 2009 20:39:51 +0000 (20:39 +0000)]
Patch to implement static casting which requires one
user-defined type conversion. Fixes PR5040.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83211
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 1 Oct 2009 20:30:46 +0000 (20:30 +0000)]
Set __EXCEPTIONS by checking on darwin's triple.
Patch by Rafael Espindola.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83209
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 1 Oct 2009 17:31:50 +0000 (17:31 +0000)]
Fix bad grammar in static analyzer diagnostic. Reported by Robert Purves!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83204
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 1 Oct 2009 13:33:33 +0000 (13:33 +0000)]
Move the "needs exception support" logic to clang. This also fixes
-fno-exceptions in C++ code. We used to always define __EXCEPTIONS in
C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83199
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 1 Oct 2009 05:49:51 +0000 (05:49 +0000)]
Fix a lame regression in IR gen for C++ delete expressions. PR5102
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 1 Oct 2009 00:31:07 +0000 (00:31 +0000)]
Add support for class and protocol references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 1 Oct 2009 00:27:30 +0000 (00:27 +0000)]
A couple of refinements for laying out debug information for
BlockDeclRefDecls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83185
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 1 Oct 2009 00:25:31 +0000 (00:25 +0000)]
Anonymous namespaces, sema + codegen. A lot of semantics are still broken,
apparently because using directives aren't quite working correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 30 Sep 2009 22:13:51 +0000 (22:13 +0000)]
Improve template argument deduction in the case where the parameter
type is a template-id (e.g., basic_ostream<CharT, Traits>) and the
argument type is a class that has a derived class matching the
parameter type. Previously, we were giving up on template argument
deduction too early.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 30 Sep 2009 21:46:01 +0000 (21:46 +0000)]
When overload resolution fails for an overloaded operator, show the
overload candidates (but not the built-in ones). We still rely on the
underlying built-in semantic analysis to produce the initial
diagnostic, then print the candidates following that diagnostic.
One side advantage of this approach is that we can perform more validation
of C++'s operator overloading with built-in candidates vs. the
semantic analysis for those built-in operators: when there are no
viable candidates, we know to expect an error from the built-in
operator handling code. Otherwise, we are not modeling the built-in
semantics properly within operator overloading. This is checked as:
assert(Result.isInvalid() &&
"C++ binary operator overloading is missing
candidates!");
if (Result.isInvalid())
PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
The assert() catches cases where we're wrong in a +Asserts build. The
"if" makes sure that, if this happens in a production clang
(-Asserts), we still build the proper built-in operator and continue
on our merry way. This is effectively what happened before this
change, but we've added the assert() to catch more flies.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 30 Sep 2009 21:39:51 +0000 (21:39 +0000)]
Tweak CHECK lines to eliminate a failure on i686-apple-darwin10
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83173
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Sep 2009 21:23:30 +0000 (21:23 +0000)]
Issue good diagnostics when initializing a refernce type with
a bad initializer. Fixes pr4274.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83169
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Wed, 30 Sep 2009 20:47:43 +0000 (20:47 +0000)]
Add an error for function parameters that have a qualified address space since this is not allowed by the embedded c extension spec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Sep 2009 20:20:06 +0000 (20:20 +0000)]
fix line #'s
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83162
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Sep 2009 20:19:10 +0000 (20:19 +0000)]
add some more popular examples, color code warning: and error: like the command line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83161
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Sep 2009 19:55:07 +0000 (19:55 +0000)]
Convert from nonportable grep to filecheck, patch by John Thompson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 30 Sep 2009 18:32:57 +0000 (18:32 +0000)]
Update C++ status page
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Sep 2009 17:46:20 +0000 (17:46 +0000)]
Note location of operators caused the circularity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Sep 2009 17:10:29 +0000 (17:10 +0000)]
<rdar://problem/
7263113 > Make clang produce gcc's objc_assign_StrongCast as a result of type-cast of an ivar in assignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 30 Sep 2009 15:59:45 +0000 (15:59 +0000)]
update copyright.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Wed, 30 Sep 2009 02:43:10 +0000 (02:43 +0000)]
Improve debugging information for BlockDeclRefExpr. WIP. Given this
scheme, we can switch the previous scheme over to using this code
path. There's a bit of simplifications yet to do as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83138
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 30 Sep 2009 01:30:54 +0000 (01:30 +0000)]
Spare the processors of those poor wretches who have no choice but to write
unbounded chains of operator-> delegations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83134
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 30 Sep 2009 01:01:30 +0000 (01:01 +0000)]
Detect operator-> chains of arbitrary length. Use a terrible data structure
to strike fear into the hearts of CPUs everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 30 Sep 2009 00:19:41 +0000 (00:19 +0000)]
self-referecing operator '->' member function was causing
infinit recursion. This patch fixes it. [13.3.1.2]-p2
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83124
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 30 Sep 2009 00:03:47 +0000 (00:03 +0000)]
Find operators new/delete in base classes. FIXME -= 2;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83119
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 29 Sep 2009 23:03:30 +0000 (23:03 +0000)]
Desugaring optimizations. Add single-step desugaring methods to all
concrete types. Use unqualified desugaring for getAs<> and sundry.
Fix a few users to either not desugar or use qualified desugar, as seemed
appropriate. Removed Type's qualified desugar method, as it was easy
to accidentally use instead of QualType's.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83116
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 29 Sep 2009 21:38:53 +0000 (21:38 +0000)]
The C++ delete expression strips cv-qualifiers from the pointed-to type. My previous fix eliminated this behavior, so bring it back again.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83113
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 21:27:32 +0000 (21:27 +0000)]
Pull TypeLocVisitor into its own header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83112
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 21:26:53 +0000 (21:26 +0000)]
Keep track of type references in DeclReferenceMap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83111
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 21:26:35 +0000 (21:26 +0000)]
In ASTVisitor, call the correct base methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83110
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 21:26:14 +0000 (21:26 +0000)]
Fix Decl class hierarchy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 29 Sep 2009 20:28:06 +0000 (20:28 +0000)]
13.1-p3 Overloadable declarations
Parameter declarations that differ only in the presence or absence of const and/or volatile are equivalent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83104
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:58:16 +0000 (19:58 +0000)]
Resolve a source location inside the return type of a functon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:45:58 +0000 (19:45 +0000)]
When pointing at a type decl reference, ASTLocation is a NamedDeclRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:45:41 +0000 (19:45 +0000)]
Resolve a source location that is inside a type declarator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:45:22 +0000 (19:45 +0000)]
Introduce ObjCInterfaceLoc which provides type source information for ObjC interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:44:47 +0000 (19:44 +0000)]
Introduce TypedefLoc::getTypedefDecl().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83096
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:44:27 +0000 (19:44 +0000)]
Modify ASTLocation and apart from being a Decl or Stmt, allow it to also be:
-A NamedDecl reference
-A TypeLoc
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:43:35 +0000 (19:43 +0000)]
Introduce ObjCProtocolListLoc for keeping source location information for protocol references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83094
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:42:55 +0000 (19:42 +0000)]
Introduce ObjCProtocolListType type subclass.
This is used only for keeping detailed type source information for protocol references,
it should not participate in the semantics of the type system.
Its protocol list is not canonicalized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:42:11 +0000 (19:42 +0000)]
Move DeclSpec::setProtocolQualifiers() out of line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:41:44 +0000 (19:41 +0000)]
Keep protocol source locations when parsing protocol references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:41:13 +0000 (19:41 +0000)]
Introduce Type::getTypeClassName() that returns the string associated with the TypeClass enum.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83090
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Tue, 29 Sep 2009 19:40:46 +0000 (19:40 +0000)]
Introduce TypeLoc::getSourceRange().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83089
91177308 -0d34-0410-b5e6-
96231b3b80d8